I have a RadGrid with EditMode="InPlace" working just fine, but have a requirement that for Updates "InPlace" mode is needed and for Inserts "Popup" mode is needed. On top of that, I need to use EditFormType="Template" for Popup mode only, because we don't want to see the Insert & Cancel links. So I need to be able to toggle back and forth between these 2 modes and only 1 of the modes uses a template. How can I best accomplish this?
Thanks,
Rob
Thanks,
Rob
4 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 12 Nov 2009, 04:12 AM
Hello Dudeman,
Check out the following code to achieve the required:
c#:
Thanks
Princy.
Check out the following code to achieve the required:
c#:
| protected void RadGrid1_ItemCommand(object source, GridCommandEventArgs e) |
| { |
| if (e.CommandName == RadGrid.EditCommandName) |
| { |
| RadGrid1.MasterTableView.EditMode = GridEditMode.InPlace; |
| } |
| if(e.CommandName == RadGrid.InitInsertCommandName) |
| { |
| RadGrid1.MasterTableView.EditMode = GridEditMode.PopUp; |
| RadGrid1.MasterTableView.EditFormSettings.EditFormType = GridEditFormType.Template; |
| } |
| } |
Thanks
Princy.
0
Rob
Top achievements
Rank 1
answered on 12 Nov 2009, 03:50 PM
That does the trick. Thanks!
0
Dylan
Top achievements
Rank 1
answered on 31 Jul 2013, 04:02 PM
This doesn't handle the case where an edit window and an insert window are both open at the same time.
0
Hello Dylan,
For handling those cases, all opened for editing items should be closed by setting the Edit property to false.
An example of the above and the switching between the edit modes, plus clearing all items that are currently in edit mode, is available in this thread.
Best Regards,
Konstantin Dikov
Telerik
For handling those cases, all opened for editing items should be closed by setting the Edit property to false.
An example of the above and the switching between the edit modes, plus clearing all items that are currently in edit mode, is available in this thread.
Best Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
