Accessing Grid Rows Server-Side

Accessing rows from external Controls

Iterating through the Items collection on a Button's click

protected void RadButton1_Click(object sender, EventArgs e)
{
    foreach (GridDataItem dataItem in RadGrid1.Items)
    {

    }

    foreach (GridDataItem dataItem in RadGrid1.MasterTableView.Items)
    {

    }
}

Accessing Edit Forms

Inserting

private void SomeMethod()
{
    if (RadGrid1.MasterTableView.IsItemInserted)
    {
        GridEditableItem insertItem = RadGrid1.MasterTableView.GetInsertItem();
    }
}

Editing

Items in edit mode are contained in the EditItems property of the RadGrid object.

private void SomeMethod()
{
    GridItemCollection editItems = RadGrid1.EditItems;

    foreach (GridEditableItem editItem in editItems)
    {

    }
}
In this article
Not finding the help you need? Improve this article