Updating parent and child records with a single save button

4 posts, 0 answers
  1. Annie
    Annie avatar
    3 posts
    Member since:
    Aug 2014

    Posted 31 Aug 2014 Link to this post

    Hi,

    In a Telerik kendo hierarchical grid for asp.net mvc is it possible to update both parent and child tables with a single save button on the parent grid

    Thanks,
    Annie
  2. Alexander Popov
    Admin
    Alexander Popov avatar
    1444 posts

    Posted 03 Sep 2014 Link to this post

    Hi Annie,

    Saving both parent and child Grids using a single request is not supported out of the box. A similar behavior could be achieved by subscribing to the parent Grid's DataSource requestEnd event. Once the event is triggered you can check if the type of the request is "create" or "update", get the instances of all child Grids, iterate over their data items, set  a value for the ID field using the one got from the response and finally sync the child Grid's dataSources.

    Regards,
    Alexander Popov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. Annie
    Annie avatar
    3 posts
    Member since:
    Aug 2014

    Posted 03 Sep 2014 in reply to Alexander Popov Link to this post

    Thanks for your reply. Is it possible to give example code, I am very new to Telerik Kendo UI
  4. Alexander Popov
    Admin
    Alexander Popov avatar
    1444 posts

    Posted 04 Sep 2014 Link to this post

    Hello Annie,

    I am afraid that we do not have an example meeting your criteria and implementing the described functionality would require a custom solution that is beyond the scope of our support services.

    Regards,
    Alexander Popov
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top