Hi
I am using radgrid 5.1.2
I am sure this is an obvious question but I can't find it in the documentation. How do i find the row index of the grid in the item data bound event
thanks
3 Answers, 1 is accepted
0
Daniel
Telerik team
answered on 26 Nov 2008, 07:19 PM
Hello Andieje,
I suggest you test the following approach in order to get the desired index:
Table row index
int rowIndex = e.Item.RowIndex;
Grid item index
int itemIndex = e.Item.ItemIndex;
Let us know if you need more information.
Best regards,
Daniel
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Is there a way to find out grid cell index? In the following example, value of 'column' variable gives us table cell index. How can i get grid cell index like for rows?
int column = 0;
foreach (GridTableCell cell in ((GridDataItem)e.Item).Cells) { column++; ... }
Here is the sample code I tried to get the cell indexes of rows.The column index starts at index 2 because GridExpandColumn and GridRowindicatorColumn are always in front of data columns.