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

Want a selected row data in any radgrid server side event

1 Answer 581 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Meghna
Top achievements
Rank 1
Meghna asked on 25 Dec 2008, 04:00 PM
I have Radgrid on my page and want to save data of the selected row in any of its event. Can anyone help me how to get the selected row data and on which event i can get that data for my further use.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 29 Dec 2008, 04:36 AM

Hi Meghna,

Try the below code snippets to get the selected row in server side.

CS:

protected void RadGrid1_SelectedIndexChanged(object sender, EventArgs e)   
{   
    foreach (GridDataItem selectedItem in RadGrid1.SelectedItems)   
    {   
         string strName = selectedItem["Name"].Text;   
         string strID = selectedItem["ID"].Text;   
    }   

Thanks,
Princy.
Tags
Grid
Asked by
Meghna
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or