This question is locked. New answers and comments are not allowed.
David Johnson
Top achievements
Rank 1
David Johnson
asked on 01 Sep 2009, 09:58 PM
Hi,
I’m performing discreet paging and I need to be able to track the row index as the user scrolls through the grid.
The standard Microsoft DataGrid contains a LoadingRow event which allows me to then grab e.Row.GetIndex().
How might I accomplish this using the RadGridView
Thank you
dj
4 Answers, 1 is accepted
0
Hi David Johnson,
RadGridView has a similar event called RowLoaded. Just subscribe to the event and in the event handler do something like:
Hope this helps
All the best,
Milan
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.
RadGridView has a similar event called RowLoaded. Just subscribe to the event and in the event handler do something like:
void playersGrid_RowLoaded(object sender, RowLoadedEventArgs e) |
{ |
if (e.Row is GridViewHeaderRow || e.Row is GridViewNewRow || e.Row is GridViewFooterRow) |
return; |
var row = e.Row as GridViewRow; |
int index = this.MyGrid.Items.IndexOf(row.DataItem); |
} |
Hope this helps
All the best,
Milan
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.
0
Enal
Top achievements
Rank 1
answered on 10 Jan 2012, 08:36 PM
Hello -
Unfortunately this API doesn't seem to exist: row.DataItem
How does one get the row/column index of a cell these days?
Thanks!
Unfortunately this API doesn't seem to exist: row.DataItem
How does one get the row/column index of a cell these days?
Thanks!
0
Hi Enal,
Maya
the Telerik team
You can work with the Item property of GridViewRow instead - row.Item.
Maya
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
Enal
Top achievements
Rank 1
answered on 16 Jan 2012, 07:55 PM
Ok, thanks. This leads to a larger issue but I better start a new thread. Thanks!