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

Single and Range Value Selection

  • 2 minutes to read

ASPxTrackBar supports two selection modes: single value selection and range selection.

Single Value Selection

Single value selection mode is default for the ASPxTrackBar control.

trackbar_concepts_HorzVertDisplay0

In the single value selection mode, only the main drag handle is displayed. In this case, the ASPxTrackBar.Position property is used to specify the drag handle position. By default (in decimal scale display mode), a drag handle position corresponds to the track bar value. If you use an items display mode, the drag handle position is specified by the corresponding item’s zero-based index. You can manipulate the drag handle position on client-side with the ASPxClientTrackBar.GetPosition and ASPxClientTrackBar.SetPosition methods.

Range Selection

Set the ASPxTrackBar.AllowRangeSelection property to True to enable the range selection mode. The secondary drag handle appears; this allows end-users to select a range of values instead of a single value.

trackbar_concepts_range_selection

In the range selection mode, the ASPxTrackBar.PositionStart and ASPxTrackBar.PositionEnd properties are used to specify main and secondary drag handle positions respectively. You can manipulate range selection on the client-side with the following methods.

Note

The Position and PositionStart properties define a main drag handle position in different selection modes, but they always synchronize their values.

Respond To An End-User Value Selection

When an end-user has finished changing an editor handle position, the ASPxTrackBar.PositionChanged server event fires. See the Client-Side API topic for more information about client-side events.

See Also