Mahdi Tahsildari Mahdi Tahsildari - 1 year ago 163
ASP.NET (C#) Question

Get rows of a Telerik RadGrid

I'm working on a RadGrid, and I want to access its rows but it seems it does not have a


Here's what I have tried until now:

enter image description here

How can I access
's Rows collection? I want to add a button to each row.

Answer Source

According to Telerik's documentation,

"Each dynamic row in the grid represents a record from the specified data source. Dynamic rows are represented by the GridDataItem class (a descendent of GridItem).

Each GridTableView has a set of rows (the Items collection) of type GridDataItem."

So you want to use the Items collection of the grid, which is a collection of GridDataItems.

protected void btnLoad_Click(object sender, EventArgs e)
  rgCustomers.DataSource = odsCustomers;
  foreach (GridDataItem row in rgCustomers.Items)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download