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

Get the current row index of the radgrid

2 Answers 924 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Mahadevan
Top achievements
Rank 1
Mahadevan asked on 06 Dec 2012, 04:41 PM
Hi,

I am writing some code in the update command (ie. RadGrid1_UpdateCommand) and I want to retrieve the current row index (selected row) from the radgrid. How do I achieve this?


Thanks,
Swamy

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 07 Dec 2012, 03:23 AM
Hi Mahadevan,

Please try the following code snippet to get the row index.

C#:
protected void RadGrid1_UpdateCommand(object sender, GridCommandEventArgs e)
{
    GridEditableItem EditItem = (GridEditableItem)e.Item;   
    rowindex = EditItem.ItemIndex; //you will get the row index here
}

Thanks,
Shinu.
0
Mahadevan
Top achievements
Rank 1
answered on 10 Dec 2012, 07:44 PM
Thanks a lot Shinu
Tags
Grid
Asked by
Mahadevan
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Mahadevan
Top achievements
Rank 1
Share this question
or