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

How to determine index of an item in the RadGridView

2 Answers 288 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tony
Top achievements
Rank 1
Tony asked on 04 May 2012, 01:30 PM
I have a reference to an object that is in the RadGridView, but it is not necessarily the currently selected object in the RadGridView, and I need to find the object that immediately precedes or follows it.  I have an ObservableCollection of objects, but the order of the objects in the ObservableCollection does not always match the order of the rows in the RadGridView, since the user can sort the RadGridView.

Is there a way I can retrieve a reference to a collection of the RadGridView's items that is in the same order as the data currently is in the RadGridView?

Tony

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitrina
Telerik team
answered on 04 May 2012, 02:05 PM
Hi,

 You can use the "RadGridView.Items" DataItemCollection of the RadGridView.

Kind regards,
Didie
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tony
Top achievements
Rank 1
answered on 07 May 2012, 08:40 PM
Thank you!
Tags
GridView
Asked by
Tony
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Tony
Top achievements
Rank 1
Share this question
or