Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Accessing Row Data In Telerik RadGrid (Server Side)

Ive no problems using Javascript to read the rows of a telerik radgrid component im using however I can seem to find anyway to access the row data server side when a postback occurs. Ive spent ages looking for solution but no luck. Any pointers would be greatly appreciated.

Tony

like image 448
TonyNeallon Avatar asked Jan 08 '09 00:01

TonyNeallon


1 Answers

This is the one that works for me and uses the RadGrid.SelectedItems collection.

protected void LinkButton1_Click(object sender, EventArgs e)
    {
        List<Guid> OrderIdList = new List<Guid>();

        foreach (GridDataItem OrderItem in this.RadGrid1.SelectedItems)
        {
            OrderIdList.Add(new Guid(OrderItem.GetDataKeyValue("OrderId").ToString()));
        }
    }
like image 166
Solburn Avatar answered Oct 25 '22 10:10

Solburn