DataControlBase.GetSelectedRowHandles() Method
Returns the handles of the selected rows.
Namespace: DevExpress.Xpf.Grid
Assembly: DevExpress.Xpf.Grid.v18.2.Core.dll
Declaration
Returns
Type | Description |
---|---|
Int32[] | An array of integer values representing the handles of the selected rows. An empty array if no rows are selected. |
Remarks
Multiple rows can be selected when the TableView.MultiSelectMode option is set to MultiSelectMode.Row or MultiSelectMode.MultipleRow. You can use the GetSelectedRowHandles method to obtain the handles of the selected rows. Also, the DataControlBase.SelectedItems property returns the collection of currently selected rows/nodes.
When multiple selection is disabled, the GetSelectedRowHandles method returns an array containing a single element that represents the focused row handle. This value can also be obtained using the DataViewBase.FocusedRowHandle property.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the GetSelectedRowHandles() method.
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.