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

Custom Edit

3 Answers 69 Views
Editor
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 14 Feb 2014, 05:38 PM
Custom Edit issue with Child Object.
I have a grid with a Custom Editor. The object that I want to edit has a child object.
When I select update in the editor it updates both objects.
If I select edit again on the same object it brings up the editor in the current state as expected.
This time when I select update in the controller it shows the data for the child object in the original state.

What I am looking for at this point is an example of using the grid and update that actually updates a child object.
I've see lots of examples that update the parent object, of display a child detail but nothing that actually updates both the parent and child.
Do I need to create a separate update on the child inside of my Custom Editor?

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 18 Feb 2014, 03:07 PM
HI David,

Basically to update complex field from the model you should use the following approach:
In the above example the DropDownList will set selected object from it's DataSource to the related Grid property - that way all of the fields in the nested object will be updated. 

Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
David
Top achievements
Rank 1
answered on 18 Feb 2014, 03:32 PM
The link is to the standard inline editor.
I need to use a custom PopUp Editor. Not all of the fields that I need in the editor are to be displayed in the Grid.
Any suggestions of sample code for that?
0
Vladimir Iliev
Telerik team
answered on 20 Feb 2014, 10:18 AM
Hi David,

Basically you can modify that example to use PopUp editing by defining custom PopUp editor template and moving the "ClientCategory" view code inside it. For convenience I also created a stand-alone example which achieves the desired behavior and attached it to the current thread. 

Kind Regards,
Vladimir Iliev
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Editor
Asked by
David
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
David
Top achievements
Rank 1
Share this question
or