Fires when row/cell selection is changed in multiple selection mode.
[DXCategory("Property Changed")] public event SelectionChangedEventHandler SelectionChanged
<DXCategory("Property Changed")> Public Event SelectionChanged As SelectionChangedEventHandler
The SelectionChanged event's data class is SelectionChangedEventArgs. The following properties provide information specific to this event:
|Action||Gets an action which describes how the collection has been changed.|
|ControllerRow||Identifies the row whose selected state has been changed.|
If the ColumnViewOptionsSelection.MultiSelect property is set to true, it’s possible to select multiple rows or cells simultaneously. In this mode, modifying row/cell selection fires the SelectionChanged event. If a specific row/cell is selected, the SelectionChanged event will also fire every time the grid’s data is grouped and/or filtered.
Do not rely your business logic on the Action parameter, as its meaning may be changed in the future. Currently, when rows are selected, the SelectionChanged event fires with the Action parameter set to Add or Refresh (depending on how rows are selected). When rows are deselected, the Action parameter will be either Remove or Refresh (depending on how rows are deselected).
The SelectionChangedEventArgs.ControllerRow property may return the GridControl.InvalidRowHandle property’s value when a single row is selected. It also returns this value after the selected row collection has been refreshed. For instance, this happens after the data has been grouped or filtered, or after a batch selection modification (see BaseView.BeginSelection).
For information on selecting rows/cells in code, see Multiple Row and Cell Selection.
For information on selecting rows/cells at runtime by end-users, refer to End-User Capabilities: Selecting Rows/Cards.
If the ColumnViewOptionsSelection.MultiSelect property is set to false, the multiple row selection feature is disabled. In this mode, the SelectionChanged event doesn’t fire when focus moves between rows. To respond to focus moving from one row or card to another (even when multiple selection mode isn’t used), you can handle the ColumnView.FocusedRowChanged event.
Rows cannot be selected if merging neighboring cells with identical values is allowed (the GridOptionsView.AllowCellMerge option is enabled).