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

ASPxClientTrackBar.PositionChanged Event

Fires after the editor’s position has been changed.

Declaration

PositionChanged: ASPxClientEvent<ASPxClientProcessingModeEventHandler<ASPxClientTrackBar>>

Event Data

The PositionChanged event's data class is ASPxClientProcessingModeEventArgs. The following properties provide information specific to this event:

Property Description
processOnServer Specifies whether or not to process the event on the server.

Remarks

The PositionChanged event is raised after an end-user has finished changing an editor handle position in the time interval specified via the ASPxTrackBar.ValueChangedDelay property.

The event parameter’s processOnServer property enables you to specify where the current user action should be processed - either on the client side or on the server side. If this property is set to false in a client event’s handler, the event is completely handled on the client side without a callback to the server. Setting the processOnServer property to true indicates that the final processing of the event should be performed on the server side. During such a round trip, the ASPxTrackBar.PositionChanged server-side event is fired, which if handled, allows any desired server-side action to be performed.

You can perform specific actions before a position is changed by handling the ASPxClientTrackBar.PositionChanging event.

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