Items Mode
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.
ASPxTrackBar stores its items (instances of the TrackBarItem object) in the ASPxTrackBar.Items collection.
- the text displayed as the item label (the TrackBarItem.Text property);
- the unique item value (the TrackBarItem.Value property);
- the tooltip text displayed for an item when a user selects it (the TrackBarItem.ToolTip property).
In items display mode, you do not need to specify the following properties:
- ASPxTrackBar.MinValue - is automatically changed to 0;
- ASPxTrackBar.MaxValue - is automatically changed based on item count;
- ASPxTrackBar.LargeTickInterval - is not in effect;
- ASPxTrackBar.SmallTickFrequency - is not in effect;
- ASPxTrackBar.Step - is automatically changed to 1.
The positions to which users can move drag handles correspond directly to items from the ASPxTrackBar.Items collection. When a user selects an item, the item’s index is assigned to the editor’s ASPxTrackBar.Position (or ASPxTrackBar.PositionStart/ASPxTrackBar.PositionEnd) property.
Use the editor’s ASPxTrackBar.ValueType property to specify the type of item values.
You can populate the items collection manually, or bind an editor to a data source to populate it automatically (use the ASPxTrackBar.DataSourceID and ASPxTrackBar.DataSource properties).