New to Telerik UI for WinFormsStart a free 30-day trial

Selected rows and Current row

Updated over 6 months ago

IsSelected

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

C#
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:

C#
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:

C#
this.radGridView1.CurrentRow = null;

See Also

In this article
IsSelectedIsCurrentSee Also
Not finding the help you need?
Contact Support