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

How to get item from selected row in RadGrid

1 Answer 122 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Shahid
Top achievements
Rank 1
Shahid asked on 30 Aug 2012, 10:13 PM
Hi,

I created a RadGrid control which shows up list of items from SharePoint List. Now how to get that selected row or just a single column of that selected row from that RadGrid view in to a label or string.

Thanks!

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 03 Sep 2012, 04:15 PM

Hi Shahid,

Just set ClientSettings.EnablePostBackOnRowClick to true for the grid, attach an event handler to the grid's ItemCommand event and therein use the following code:

protected void RadGrid1_ItemCommand(object sender, GridCommandEventArgs e) 
    if (e.CommandName == "RowClick"
    
        Hashtable columnValues = new Hashtable(); 
        ((GridDataItem)e.Item).ExtractValues(columnValues); 
    
 }

Hope it helps.

Regards,
Tsvetoslav
the Telerik team

Tags
Sharepoint Integration
Asked by
Shahid
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or