Skip to main content

ASPxClientGridView.SelectionChanged Event

Fires when the row selection changes.


SelectionChanged: ASPxClientEvent<ASPxClientGridViewSelectionEventHandler<ASPxClientGridView>>

Event Data

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

Property Description
isAllRecordsOnPage Gets whether all rows displayed within a page have been selected or unselected.
isChangedOnServer Gets whether a selection has been changed on the server.
isSelected Gets whether the row has been selected.
processOnServer Specifies whether or not to process the event on the server. Inherited from ASPxClientProcessingModeEventArgs.
visibleIndex Gets the visible index of the row whose selected state has been changed.


The SelectionChanged event fires when the row selection changes by user interaction or in code.

The event parameter’s processOnServer property specifies whether to finally process the event on the server and fire the ASPxGridBase.SelectionChanged event or completely handle the SelectionChanged event on the client-side.

When the row selection changes on the server, you cannot identify the changes on the client-side and the control behaves as follows:



In the example below, the control raises the client-side SelectionChanged event to obtain contact names from selected rows and display them within the list box.

Run Demo: ASPxGridView - Using Checkboxes

ASPxGridView - ClientSelectionChanged

<dx:ASPxListBox ID="ASPxListBox1" ClientInstanceName="selList" runat="server"
<dx:ASPxGridView ID="grid" ClientInstanceName="grid" runat="server" KeyFieldName="CustomerID">
        <dx:GridViewCommandColumn ShowSelectCheckbox="true" />
        <dx:GridViewDataColumn FieldName="ContactName" />
    <ClientSideEvents SelectionChanged="grid_SelectionChanged" />
function grid_SelectionChanged(s,e) {
function GetSelectedFieldValuesCallback(values) {
    try {
        for(var i=0;i<values.length;i++) {
    } finally {

The event’s isSelected parameter specifies whether the row is selected. To determine the selected row’s keyValue, use the GetRowKey(visibleIndex) method.

function OnSelectionChanged(s, e) {
    if (e.isSelected) {
        var key = s.GetRowKey(e.visibleIndex);
        alert('Key = ' + key);
See Also