Hello.
I have a XamGrid with available grouping column. And AutoGeneratedColumns is false. ItemsSource binding on ViewModel's property.
I do next:
1. group XamGrid on some column.
2. change DataContext of XamGrid to null and then change DataContext on some other ViewModel. I expect that ItemsSource of XamGrid is changed and sorting and grouping options will not change.
But after changing DataContext there is no any grouped columns on XamGrid.
There is a bug? There is any workaround when grouping settings are not reset?
BR
Alexey Lukyanov
If you want to maintain the sort and grouping, you can use the persistence framework to save the layout of the grid to a memory stream, reset your data context, and then restore the sorting and grouping.
When the .DataContext is cleared (or the ItemSource) the groupby / sorting settings are removed by design.
Thanks for fast response.
You do not plan to add that feature in future? I think it is not very good use so resource-intensive persistence framework for this simple task.
BR,