Custom Edit

4 posts, 0 answers
  1. David
    David avatar
    22 posts
    Member since:
    Jun 2013

    Posted 14 Feb 2014 Link to this post

    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?
  2. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 18 Feb 2014 Link to this post

    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!
  3. UI for ASP.NET MVC is VS 2017 Ready
  4. David
    David avatar
    22 posts
    Member since:
    Jun 2013

    Posted 18 Feb 2014 in reply to Vladimir Iliev Link to this post

    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?
  5. Vladimir Iliev
    Admin
    Vladimir Iliev avatar
    2172 posts

    Posted 20 Feb 2014 Link to this post

    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!
Back to Top
UI for ASP.NET MVC is VS 2017 Ready