Even in this ajax example which I really like the look of, when ever the top level grid is sorted the "state" of what you were doing "disappears"
Open the first person's row (Nancy Davolio) so you can see the Sales grid
Sort by Order Total in the Sales grid
Sort by Birth Date in the top level grid
Nancy Davoilo should now be second. Open her row.
The sales grid is no longer sorted by Order Total
This may seem trivial, or that i'm being picky; However:
If I have some text box(or some other type of method of accepting user input) on the sales grid, I would assume that this would get destroyed when sorting the top level grid. I would also think that even if I had this input on the top level grid, that sorting the top level grid (or filtering if there were filters) would destroy this input.
It seems that even paging destroys this.
$("#div1").data("object",someObject) would persist after sorting, paging and filtering.
Is there a way to make this happen?
Am I making what i'm looking to do clear? If not i'm happy to clarify.
Additional Notes: I would think the client side performance hit would be minimal to do something like this as long as there were not a very large number of rows. In fact there would be a lot less work on the server in recreating all of the records, repeated calls to the server/database and as in my example at the top the subPages would only need to be created once rather than twice.
Take a look at the HierarchyLoadMode property of the MasterTableView. The demo you reference is using
HierarchyLoadMode.ServerOnDemand which, according to Telerik's documentation, means that ViewState only maintains the state of the visible items. Therefore, when a details grid is collapsed you will lose its state (e.g. a sort order, page number, etc).
There are other modes. You can choose
HierarchyLoadMode.ServerBind which maintains ViewState for all detail tables but requires a PostBack to expand a detail table. The
HierarchyLoadMode.Client renders the MasterTableView and all DetailTables and items are expanded/collapsed on the client - no PostBack required. Either of those modes should also maintain the sort order and other state related to the detail tables.
I hope that helps answer your question.
I recently got a reply from the Telerik support that their AJAX grid supports client binding out-of-the-box with sorting, paging and filtering with flat structure only (as in this demo).
For your case you may have two options:
©2020 All rights reserved.