Skip to main content
A newer version of this page is available. .

Client-Side API

  • 3 minutes to read

The ASPxTrackBar control provides you with a comprehensive client-side API. This API is implemented using JavaScript and is exposed via the ASPxClientTrackBar object. The ASPxClientTrackBar object serves as a client-side equivalent of the ASPxTrackBar control.

ASPxClientTrackBar implements the functionality that allows you to perform the following track bar related actions on the client.

In addition, ASPxClientTrackBar exposes the common client API, which it inherits from its direct ansestor - ASPxClientEdit.

Refer to Client-Side Functionality Overview to learn more about DevExpress client-side model implementation.

 

Manipulate drag handle positions

Depending upon the selection mode applied, you can use different client methods to obtain or change drag handle positions on the client side.

Respond to an end-user changing drag handle positions

Each time an end-user manipulates ASPxTrackBar‘s elements on the client, you can provide a proper and immediate response by handling specific exposed client events. The available client events fall into the following two categories.

  • Selection changing

    You can respond to any selection change made by an end-user and even cancel the user action by using the following events (refer to Value Selection to learn how end-users can change the editor’s selection).

    Event Description
    ASPxClientTrackBar.PositionChanging Fires on the client side before a track bar position is changed and allows you to cancel the action.
    ASPxClientTrackBar.PositionChanged Fires after the editor’s position has been changed.
  • Handle dragging

    You can independently respond to an end-user being dragged by a drag handle by using the following events.

    Event Description
    ASPxClientTrackBar.TrackStart Occurs on the client-side when an end-user presses a drag handle and moves it.
    ASPxClientTrackBar.Track Occurs on the client-side when an end-user moves a cursor while the drag handle is held down.
    ASPxClientTrackBar.TrackEnd Occurs on the client-side when an end-user releases a drag handle after moving it.

Obtain track bar item information

If ASPxTrackBar works in an items mode, you can use specific item-related methods on the client. They allow you to obtain the following information.

 

To learn more on how to use ASPxTrackBar‘s client API, refer to the following example.