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

Edit InPlace - Add Record Popup

1 Answer 48 Views
Grid
This is a migrated thread and some comments may be shown as answers.
William
Top achievements
Rank 1
William asked on 26 Jul 2011, 02:38 PM
Is it possible to edit a RadGrid inplace, but create a separate popup template for adding new records?

1 Answer, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 2
answered on 27 Jul 2011, 06:58 AM
Hello William,

You can achieve this by checking for the CommandName in ItemCommand event. Here is the sample code that I tried which worked as expected.

C#:
protected void RadGrid1_ItemCommand(object sender, Telerik.Web.UI.GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.InitInsertCommandName  )
    {
          e.Item.OwnerTableView.EditMode = GridEditMode.PopUp;
    }
    else if (e.CommandName == RadGrid.EditCommandName)
    {
        e.Item.OwnerTableView.EditMode = GridEditMode.InPlace;
    }
}

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