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

[Solved] RadGrid FormEditTemplate

2 Answers 83 Views
Grid
This is a migrated thread and some comments may be shown as answers.
ratheesh
Top achievements
Rank 1
ratheesh asked on 29 Dec 2009, 08:51 AM
Hi ,

I have an radgrid withit  a form template , my requirement is that when the edit form template is opened and the user clicks on
Add new record i need to close the edit form template of the grid . I tried setting IsItemInserted property of the mastertableview of the
grid to false but with no effect .

Would appreciate a quick relpy on this .

Regards
Ratheesh

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 29 Dec 2009, 09:06 AM
Hello Ratheesh,

Try this code-snippet:
protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e)
{
    if (e.CommandName == RadGrid.InitInsertCommandName)
        e.Item.OwnerTableView.ClearEditItems();
    if (e.CommandName == RadGrid.EditCommandName)
        e.Item.OwnerTableView.IsItemInserted = false;
}

I hope this helps.

Best regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Princy
Top achievements
Rank 2
answered on 29 Dec 2009, 09:33 AM
Hello Ratheesh,

Here's a help document that you would want to refer to inorder to switch between the Insert, Update and Regular modes of the grid:
Switching the Insert/Updade/Regular Modes

Hope this helps..
Princy.
Tags
Grid
Asked by
ratheesh
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Princy
Top achievements
Rank 2
Share this question
or