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

radgrid selectedrow at server side

2 Answers 187 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Liji Jose
Top achievements
Rank 1
Liji Jose asked on 24 Mar 2010, 11:44 AM
how to get the radgrid control selectedindex at serverside

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 24 Mar 2010, 12:07 PM
Hello Liji,

You can retrieve the last SelectedItem indexes by using the following code.
            int index = Convert.ToInt32(RadGrid1.SelectedIndexes[0]);

If you enabled MultiRowSelection, then use the following code to get the selected row's index values.
C#:
 
    protected void Button1_Click(object sender, EventArgs e) 
    { 
        foreach(string indexes in RadGrid1.SelectedIndexes) 
        { 
             Response.Write(indexes); 
        } 
    } 

Thanks,
Princy.
0
Liji Jose
Top achievements
Rank 1
answered on 24 Mar 2010, 12:27 PM
thanks for ur reply. but i cant get the selectedindexes in button click event. if i can get the selectedindexes then selecteditems is also possible right.
Tags
Grid
Asked by
Liji Jose
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Liji Jose
Top achievements
Rank 1
Share this question
or