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

Update In-Line and Insert with Form Template?

1 Answer 57 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Stephen
Top achievements
Rank 1
Stephen asked on 15 Jul 2010, 04:57 PM
Hello,

Is there any way to set the RadGrid to perform updates as in-line and have a separate form for an insert which would have more fields than the update?

thanks,

Steve

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 16 Jul 2010, 07:19 AM
Hello Steve,


Try the following code to show different EditModes for edit and insert.

CS:
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.EditCommandName)
    {
        e.Item.OwnerTableView.EditMode = GridEditMode.InPlace;
    }
    if (e.CommandName == RadGrid.InitInsertCommandName)
    {
        e.Item.OwnerTableView.EditMode = GridEditMode.EditForms;
    }
}


Now you can use the FormTemplate in order to customize the insert fields.


Hope this suggestion helps,
Shinu.
Tags
Grid
Asked by
Stephen
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or