Refreshing an unknown number of child grids

5 posts, 0 answers
  1. Vince
    Vince avatar
    18 posts
    Member since:
    Sep 2016

    Posted 16 Mar 2018 Link to this post

    wn nI have a parent grid that contains n number of children grids. When a child grid has a value updated, the backend will change many values in the children grid but only the child that was selected by the user will be visually updated.

    How do I force a refresh on all children grid that the child whom's data was updated without collapsing every grid? I know this should be using the "RequesEnd()" call but how do I iterate through an unknown # of children with relation to the parent the child belongs to? s

  2. Vince
    Vince avatar
    18 posts
    Member since:
    Sep 2016

    Posted 16 Mar 2018 in reply to Vince Link to this post

    ...I like how this forum has no edit functionality for typos =P
  3. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2478 posts

    Posted 19 Mar 2018 Link to this post

    Hi Vince,

    By default the users need to click the Save Changes button for the relevant Grid and then the modifications will be sent to the server. If you would like to save the changes from multiple Grid widgets you can call the saveChanges() method manually for each one. In order to get reference of all child Grids you can use jQuery and look for elements with "k-grid" CSS class that are nested in the main Grid. 

    The dojo example below outlines the approach. It uses the jQuery Grid widget, however, the relevant logic will be the same for the MVC wrapper.


    Let me know how the approach works for you.

    Regards,
    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  4. Vince
    Vince avatar
    18 posts
    Member since:
    Sep 2016

    Posted 19 Mar 2018 in reply to Viktor Tachev Link to this post

    Hi Victor, while I appreciate your response I don't think we are talking about the same thing.

    Following the example you gave me, lets say we edit Nancy's order. The backend will also update an unknown # of other customer orders (lets say Janet, Margaret, and Steven.) I now need to retrieve/refresh all children grid or the data displayed may be different than what is in the backend, it is also possible that users have some of the grids open so I'd like to refresh the data without collapsing the grids.

     

    Is this possible with Kendo without resorting to hacky techniques?

  5. Viktor Tachev
    Admin
    Viktor Tachev avatar
    2478 posts

    Posted 20 Mar 2018 Link to this post

    Hi Vince,

    Thank you for clarifying the scenario.

    By default the rows in the Grid will be collapsed when it is refreshed. In order to have them expanded I can suggest keeping track of what rows are expanded by the user. Then, when the Grid is refreshed iterate through the collection and expand the rows manually. With this approach the data in the detail grids will be re-read when they are expanded and any the most recent data will be shown. 


    The example above illustrates the approach.

    Regards,
    Viktor Tachev
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Back to Top