This documentation is archived and is not being maintained.

DataGridView.ClearSelection Method

Cancels the selection of currently selected cells.

This member is overloaded. For complete information about this member, including syntax, usage, and examples, click a name in the overload list.

Public method ClearSelection() Clears the current selection by unselecting all selected cells.
Protected method ClearSelection(Int32, Int32, Boolean) Cancels the selection of all currently selected cells except the one indicated, optionally ensuring that the indicated cell is selected.