I am having an issue trying to update the parent in a hierarchical grid after making changes in the child.
I am remembering which detail rows have been opened at the time they are opened using the DetailExpand event
I can get the data-uid's of all parent rows without issue.
So then when I update a child I need to refresh the child and also refresh the parent so that some counts are updated.
After the child is updated I call Read on the parent
This also works as expected and the parent grid reloads its data with the new counts.
However I then want to re-open detail grids that were open before read was called so the user is back where they were, not be in the default situation that all rows are collapsed again.
I thought I could just call expandRow on the grid for the id(s) that I collected earlier
dataGrid.expandRow(dataGrid.tbody.find("tr[data-uid='" + id + "']"))
However the data-uid's for all of the parent rows have now changed making my collection useless.
I thought a slightly more noddy way to do it would be to remember the indexes of the rows that were open but this is no good as the rows can change order upon the data re-loading, those counts that are being updated are used in sorting, so that is no good.
Is there something I can do to keep the data-uid's consistent across calls or some other way of remembering which ones are expanded?
By the way I also tried:
This allows me to open up the rows that were expanded but it doesn't actually reload the data so the parent counts are not updated...