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

ASPxGridBase.SelectionChanged Event

Fires after the selection has been changed.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v19.1.dll

Declaration

public event EventHandler SelectionChanged

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>

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectionChanged event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also