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

load grid in editmode

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Sigma
Top achievements
Rank 1
Sigma asked on 21 Aug 2012, 05:12 AM
Hello,

I have a RadGrid. I want to load the entire grid in edit mode in the initial load itself. How can I achieve this scenario?

please help me...

Thanks in advance
Sigma.

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 21 Aug 2012, 05:18 AM
Hi,

You can put all the items in edit mode in Prerender event as shown below.
private void RadGrid1_PreRender(object sender, System.EventArgs e)
{
    if (!IsPostBack)
    {
        foreach (GridItem item in RadGrid1.MasterTableView.Items)
        {
            if (item is GridEditableItem)
            {
                GridEditableItem editableItem = item as GridDataItem;
                editableItem.Edit = true;
            }
        }
        RadGrid1.Rebind();
    }
}
Note:Set AllowMultiRowEdit as true for the RadGrid.

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