I have a 'child' AdvancedDataGrid that is slaved to another (parent) AdvancedDataGrid so that when the user selects an item in master grid, the data for the child grid changes. If the user has sorted the child grid based on column X (for example), and then selects another item in the master grid, the new data in the child grid is no longer sorted. So the user must re-select column X to sort that new data.
Is there some way to preserve the user's preferences about which column(s) a grid uses to sort its data? Is there a way to either tell the grid to maintain this sort preference OR , in lieu of such a "feature", implement this myself?
If your data is in ArrayCollections you can assign a ListCollectionView
to the dataProvider property of your child AdvancedDataGrid and assign
your ArrayCollection data to the 'list' property of the
ListCollectionView. When you want to change the data in the child grid,
reassign the list property of the ListCollectionView. This way you avoid
reassigning the dataProvider of the child grid directly, which is what
causes the grid to reset.
For a similar example with XML data, take a look at this thread:
Thanks p_m_williams. That worked exactly as you explained. I love it when a plan comes together.