Thank you for this question.
You are correct, RadGridView
doesn't have a SelectedIndex
presents hierarchical and grouped data. Because of this, using the SelectedIndex
property by itself would be misleading.
In case of flat (nonhierarchical) data, you can use the IndexOf
property of the Rows
collection of RadGridView
. This value will represent the index of the currently selected row in the top-most level of the RadGridView
.If you would like to get the index of a row that is nested deeper in the hierarchy, please use the corresponding GridViewTemplate
Refer to the following code snippet:
|int selectedIndex = this.radGridView1.Rows.IndexOf(this.radGridView1.CurrentRow);
I hope this helps. Do not hesitate to write, if you have further questions.
All the best,
the Telerik team