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

Items Mode

  • 2 minutes to read

ASPxTrackBar allows you to display custom items instead of automatically generated decimal scale marks. Populate the ASPxTrackBar.Items collection to activate ASPxTrackBar’s items display mode.

trackbar_example_items_range

Track bar items are gathered in a ASPxTrackBar.Items collection. Items are represented as TrackBarItem objects. For each item you can define:

In the items display mode, there is no need to specify the following properties:

Possible positions to which drag handles can be moved by end-users correspond directly to items from the ASPxTrackBar.Items collection. When an end-user selects an item, the item’s index is assigned to the editor’s ASPxTrackBar.Position (or ASPxTrackBar.PositionStart/ASPxTrackBar.PositionEnd) property.

The type of item values can be centrally specified via the editor’s ASPxTrackBar.ValueType property (by default it is set to Decimal).

Items collection can be filled manually or populated automatically through binding an editor to a data source (via the ASPxTrackBar.DataSourceID and ASPxTrackBar.DataSource properties).