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

current row in rad grid

3 Answers 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Suresh G
Top achievements
Rank 2
Suresh G asked on 22 Jun 2012, 07:51 AM
Hi,

I need to get the current row's Index in rowLoaded event of Rad Grid.

Here is my code:
   private void ultraGridCaseList_RowLoaded(object sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
        {
//  how to get the index of current row?
}

and please let me know Isn't there equivalent of RowDatabound Event in WPF-RadGrid as in  Asp.net ?

Thanks

3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 22 Jun 2012, 08:52 AM
Hello,

Since the RadGridView supports UI Virtualization, it is not recommended to work with the visual elements (i.e. GridViewRows) and their properties. Please check this help article

May I ask you to share why do you need to get the row index? What is your final goal?

All the best,
Didie
the Telerik team

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

0
Suresh G
Top achievements
Rank 2
answered on 22 Jun 2012, 09:18 AM
Thanks for your reply,

Autogenerate Column property of Grid id being set as "True".
I have an arrayList which gives me the value of one of column of grid.Therefore I need the Row Index to get corresponding element from arraylist.

I have to further optimize that value from ArrayList.
0
Dimitrina
Telerik team
answered on 22 Jun 2012, 01:03 PM
Hi,

 You would better work with the data elements. If I understand you correctly you have one unbound column, and you would like to set its values (which are separete from the DataContext of the Row) when the rows are loaded. Is that correct?

Greetings,
Didie
the Telerik team

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

Tags
GridView
Asked by
Suresh G
Top achievements
Rank 2
Answers by
Dimitrina
Telerik team
Suresh G
Top achievements
Rank 2
Share this question
or