New to Telerik UI for WinForms? Download free 30-day trial

Selected rows and Current row

IsSelected

The property IsSelected determines whether a row is selected. For example, to select a row programmatically use the following code snippet:

rowToSelect.IsSelected = true;

rowToSelect.IsSelected = True

All currently selected rows are included in the SelectedRows collection. If you clear this collection and send an update message to RadGridView, this will essentially unselect all rows:

radGridView1.ClearSelection();

Me.RadGridView1.ClearSelection()

IsCurrent

The IsCurrent property determines which row is the current one. There can be only one current row or no current row if the IsCurrent property is set to null.

Most themes visualize the current and the selected rows with the same style although technically IsCurrent and IsSelected are independent of one another. The IsCurrent functionality is related to the keyboard support.

Use the following code snippet to remove the current row:

this.radGridView1.CurrentRow = null;

Me.RadGridView1.CurrentRow = Nothing

See Also

In this article