DataControlBase.SelectedItemChanged Event
Occurs after grid’s selection has been changed.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v25.2.Core.dll
NuGet Package: DevExpress.Wpf.Grid.Core
Declaration
Event Data
The SelectedItemChanged event's data class is DevExpress.Xpf.Grid.SelectedItemChangedEventArgs.
Remarks
Each time a user selects a row, the GridControl raises the SelectedItemChanged event.
The SelectedItemChangedEventArgs.NewItem property returns the selected record. The SelectedItemChangedEventArgs.OldItem property returns the record that is deselected.
If Multiple Row Selection mode is enabled and a user selects multiple rows, the DataControlBase.SelectedItem property returns the item that was selected first, and the SelectedItemChanged event does not occur.
Refer to the following help topic for more information: Row Selection.
Related GitHub Examples
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the SelectedItemChanged 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.