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

[Solved] How to get the Selected Row No. from server side

1 Answer 111 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jidesh Guptha
Top achievements
Rank 1
Jidesh Guptha asked on 28 Jul 2009, 03:14 PM
Hi,

Pls Guide me on how to get the selected Row index from server side.
I have tried the following and did not get the right answer.

protected

 

void SimpleGrid_SelectedIndexChanged(object sender, EventArgs e)

 

{

Response.Write(SimpleGrid.SelectedItems[0].RowIndex);
}

Jidesh

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 29 Jul 2009, 06:00 AM
Hi Jidesh,

Try the ItemIndex property which gets a value representing the index of grid item among the GridTableView.Items collection.

C#:
 
protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e) 
    Response.Write(RadGrid1.SelectedItems[0].ItemIndex); 

-Shinu
Tags
Grid
Asked by
Jidesh Guptha
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or