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
4 Answers, 1 is accepted
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
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?
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