Reputation: 149
I have a RadGrid and one of the columns contains an ASP button.
I'm using the following code:
GridDataItem RowNo = (sender as Button).Parent.Parent as GridDataItem;
int index = RowNo.RowIndex;
Now if I click them, the button in the 1st row's result should come as 0, the button in the 2nd row's result should come as 1, and so on.
But the code I'm using is returning values as 1 for the first row, 2 for the second row...
How can I get the actual index of the row of which button I'm clicking?
Upvotes: 1
Views: 6340