Tab

ASPxGridBase.SelectionChanged Event

Fires after the selection has been changed.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v20.2.dll

Declaration

public event EventHandler SelectionChanged
Public Event SelectionChanged As EventHandler

Event Data

The SelectionChanged event's data class is EventArgs.

Remarks

The grid (ASPxGridView, ASPxVerticalGrid, ASPxCardView) allows end users to select/deselect multiple rows using the Select command item or in code using the following APIs:

Handle the SelectionChanged event to respond to a selection change.

NOTE

If the ASPxGridBehaviorSettings.ProcessSelectionChangedOnServer property is set to false, the grid fires a client SelectionChanged event (ASPxClientGridView.SelectionChanged, ASPxClientCardView.SelectionChanged, ASPxClientVerticalGrid.SelectionChanged) on the client side without a postback to the server. Set this property to true to finally process the selection on the server side and use the SelectionChanged event.

Concept

Example

<dx:ASPxGridView ID="ASPxGridView1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1" KeyFieldName="CategoryID" OnSelectionChanged="ASPxGridView1_SelectionChanged">
    <SettingsBehavior ProcessSelectionChangedOnServer="True" />
    <Columns>
    ...
    </Columns>
</dx:ASPxGridView>
See Also