This is a migrated thread and some comments may be shown as answers.

[Solved] How to determine current row index

1 Answer 207 Views
GridView
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Randall Nelson
Top achievements
Rank 1
Randall Nelson asked on 09 Oct 2009, 06:19 PM
Since SelectedRecord has become obsolete, I am wondering how to determine the index of the current row.  Previously, it would look like:

int rIndex = MyGrid.Records.IndexOf(SelectedRecord); 

Although this code does still work, I am getting warnings that SelectedRecord is obsolete.

1 Answer, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 12 Oct 2009, 06:02 AM
Hello Randall,

You can use Items and SelectedItem instead:

int rIndex = MyGrid.Items.IndexOf(MyGrid.SelectedItem);

Kind regards,
Vlad
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Randall Nelson
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or