Welcome to the Xceed Community | Help
Community Search  
More Search Options

Persisting autofiltered result of WPF datagrid

Sort Posts: Previous Next
  •  01-25-2012, 5:08 AM Post no. 31607

    Persisting autofiltered result of WPF datagrid

    Hi,

    Is there a way to maintain the Autofilter settings when the datacontext of a grid is updated or refreshed? 

    When we filter the data and goes to another screen and comeback, then all the filters are removed and it shows the result as it was before applying the filters.

    Please suggest how to maintain the filtered state.

     

    Thanks,

    Parthiv 

     


  •  03-22-2012, 1:17 PM Post no. 31870 in reply to 31607

    Re: Persisting autofiltered result of WPF datagrid

    Hi Parathiv, 

    This is not supported out of the box. However, you could access the AutoFilterValues  on the DataGridCollectionView and manually persist it.  

     ( myGrid.ItemsSource as DataGridCollectionView ).AutoFilterValues 


    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
  •  03-26-2012, 6:35 AM Post no. 31906 in reply to 31870

    Re: Persisting autofiltered result of WPF datagrid

    Even though we persist the auto filter values manually, to what property do we set the manually persisted values of the AutoFilterValues? Because  ( myGrid.ItemsSource as DataGridCollectionView ).AutoFilterValues is a get only property.

  •  03-26-2012, 10:57 AM Post no. 31908 in reply to 31906

    Re: Persisting autofiltered result of WPF datagrid

    Hi Parthiv, 

    After looking more carefully into this, and after discussing this with the development team,  it turns out that this can unfortunately not be done through our API. Accessing the Distinct values of the AutofilterControl is programmed in a way that it could only be set through the AutoFilterControl host. 

    I apologize for my earlier reply as I have mislead you, I thought it could be done, but unfortunately, it couldn't.  


    Best Regards,

    Michel Dahdah
    Technical Support
    Xceed Software inc.
View as RSS news feed in XML
Contact | Site Map | Reviews | Legal Terms of Use | Trademarks | Privacy Statement Copyright 2011 Xceed Software Inc.