A newer version of this page is available. Switch to the current version.

GridViewBase.ClearSelection() Method

Obsolete. Unselects any selected rows/cards within a View.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.1.dll


[Obsolete("Use the DataControlBase.UnselectAll method instead")]
public void ClearSelection()
<Obsolete("Use the DataControlBase.UnselectAll method instead")>
Public Sub ClearSelection


Multiple row/card selection isn't allowed if the DataViewBase.NavigationStyle property is set to GridViewNavigationStyle.None and the TableView.MultiSelectMode (CardView.MultiSelectMode in card views) property is set to 'None'.

The ClearSelection method clears the current selection (clears the DataViewBase.SelectedRows collection). To select all rows/cards, use the DataViewBase.SelectAll method. To select or unselect individual rows/cards, use the GridViewBase.SelectRow and GridViewBase.UnselectRow methods, respectively.

To learn more, see Multiple Row Selection.

See Also