The requested page is not available for the requested platform. You are viewing the content for Default platform.

ASPxClientTrackBar.PositionChanged Event

Fires after the editor's position has been changed.

Declaration

PositionChanged: ASPxClientEvent<ASPxClientProcessingModeEventHandler<ASPxClientTrackBar>>

Event Data

The PositionChanged event handler receives an argument of the ASPxClientProcessingModeEventArgs type. The following properties provide information specific to this event.

Property Description
processOnServer Gets or sets a value that specifies whether the event should be finally processed on the server side.

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 postback 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.

Examples

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

The ASPxClientTrackBar.PositionChanging event is handled 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 an end-user completing the change to 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