ASPxTrackBar.ValueType Property
Gets or sets the data type of a track bar item value.
Namespace: DevExpress.Web
Assembly: DevExpress.Web.v24.2.dll
Declaration
Property Value
Type | Default | Description |
---|---|---|
Type | decimal | A Type object that specifies the type of values. |
Remarks
The ValueType property supports the following values.
- System.Boolean
- System.Int16
- System.Int32
- System.String
- System.Decimal
- System.Char
- System.Byte
- System.Guid
This property is a wrapper of the TrackBarProperties.ValueType property.
Example
This example demonstrates how to manually define items in the ASPxTrackBar’s Items collection and enable item range selection.
The ASPxTrackBar.ValueType
property should be specified if you want to use items with non-decimal values.
The ASPxTrackBar.MaxValue property is automatically calculated with respect to the item count. The ASPxTrackBar.Step property is automatically changed to 1.
Note
The ASPxTrackBar.ScalePosition property value should be other than None in order to display items.
<dx:ASPxTrackBar ID="ASPxTrackBar1" runat="server" ScalePosition="Both"
AllowRangeSelection="True"
PositionEnd="4" PositionStart="0" ValueType="System.String">
<Items>
<dx:TrackBarItem Text="Mon" Value="Monday"/>
<dx:TrackBarItem Text="Tue" Value="Tuesday"/>
<dx:TrackBarItem Text="Wed" Value="Wednesday"/>
<dx:TrackBarItem Text="Thu" Value="Thursday"/>
<dx:TrackBarItem Text="Fri" Value="Friday"/>
<dx:TrackBarItem Text="Sat" Value="Saturday"/>
<dx:TrackBarItem Text="Sun" Value="Sunday"/>
</Items>
</dx:ASPxTrackBar>