Skip to main content
Tab

ASPxTrackBar.ScalePosition Property

Gets or sets the scale position with respect to the track.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v23.2.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(ScalePosition.None)]
public ScalePosition ScalePosition { get; set; }

Property Value

Type Default Description
ScalePosition None

One of the ScalePosition enumeration values.

Available values:

Name Description
None

A scale is not displayed in an editor.

ScalePosition_None

Both

A scale is displayed at both sides of the editor: left and right (for the vertical orientation), or top and bottom (for the horizontal orientation).

ScalePosition_Both

RightOrBottom

A scale is displayed at the right side of the editor (for the vertical orientation) or at the bottom side (for the horizontal orientation).

ScalePosition_RightOrBottom

LeftOrTop

A scale is displayed at the left side of the editor (for the vertical orientation) or at the top side (for the horizontal orientation).

ScalePosition_LeftOrTop

Remarks

This property is a wrapper of the TrackBarProperties.ScalePosition property.

Example

The code sample below demonstrates how you can use the ASPxTrackBar control to specify a filter condition for the ASPxGridView control.

Handle the ASPxClientTrackBar.PositionChanging event to update label content that displays the currently selected range. The ASPxClientTrackBar.PositionChanged event handler applies the specified filter to the grid by using the ASPxClientGridView.ApplyFilter method. Note that the ASPxTrackBar.ValueChangedDelay property specifies the time interval between when a user changes the editor’s value and when the filter is applied.

The image below shows the result.

TrackBar_Grid

function initLbRange() {
     lbRange.SetText('$' + tbSale.GetPositionStart() + ',000 - $' + tbSale.GetPositionEnd() + ',000');
     updateGrid();
};

function updateLbRange(s, e) {
     lbRange.SetText('$' + e.newPositionStart + ',000 - $' + e.newPositionEnd + ',000');
};

function updateGrid() {
     var filterCondition = "[Sale] > " + tbSale.GetPositionStart() * 1000 
     + " AND [Sale] < " + tbSale.GetPositionEnd() * 1000;
     grid.ApplyFilter(filterCondition);
};
See Also