Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
35
Persist sorting and expanders
posted

I am working with the XamDataGrid in MVVM Context.  My problem is that when i change tabs (i.e. DataContextChanged) and then click back on the original tab, all of the expanders that were clicked are now collapsed and the header that I last clicked to sort did not persist.

I have tried saving sort descriptions in the ViewModel which works okay.  For the expanders, I have tried saving the indexes of the expanded rows and re-expand iteritavely when the switching back.  This seems hackish and there is a bit of delay.  Worst of all when I have a XamDataGrid that has records with expanders nested insided other expanders, I cannot seem to target the nested rows to expand them programmatically.

 

Is there a way to persist the sort info and which rows were expanded declaratively like a binding property in the ViewModel?

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello,

     

    I am just checking if you got this worked out or you still require any assistance or clarification on the matter.

Children
No Data