We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to save advanced UI filtering user preferences

Thread ID:

Created:

Updated:

Platform:

Replies:

125337 Aug 9,2016 11:33 AM Aug 11,2016 05:07 AM WPF 3
loading
Tags: SfDataGrid
Gianni Ghezzi
Asked On August 9, 2016 11:33 AM

The great flexibility of SFDataGrid is the Advanced filter UI that provides multiple filter options to filter the data easily directly on UI.
The problem is that on every application start the user need to set again the personalized UI filter if he want the same options setted before exit from the application.
I'd like to know if is there the possibility to save the preferences of UI filtering user filter options on application exit and reload them on the next application start.
Thanks!

Sowndaiyan Paulpandi [Syncfusion]
Replied On August 10, 2016 07:53 AM

Hi Gianni,  
Thanks for contacting Syncfusion Support.  
You can achieve your requirement by using Serialization and Deserialization concept. SfDataGrid allows you to save and load the grid settings using the SfDataGrid.Serialize and SfDataGrid.Deserialize methods. We have prepared a sample as per your requirement and you can download the same from the below location, 
By default, SfDataGrid allows you to Serialize/Deserialize the Sorting, Grouping and Filtering operations. You can serialize the Filtering operation alone by disabling the other operations using SerializationOptions and DeserializationOptions like the below code example.

C# 
For serialize:

var serializationOptions = new SerializationOptions() 
            { 
                SerializeFiltering = true, 
                SerializeCaptionSummary = false, 
                SerializeColumns = false, 
                SerializeDetailsViewDefinition = false, 
                SerializeGrouping = false, 
                SerializeGroupSummaries = false, 
                SerializeSorting = false, 
                SerializeStackedHeaders = false, 
                SerializeTableSummaries = false, 
                SerializeUnBoundRows = false 
            };

For Deserialize :

var deserializationOptions = new DeserializationOptions() 
            { 
                DeserializeFiltering = true, 
                DeserializeCaptionSummary = false, 
                DeserializeColumns = false, 
                DeserializeGrouping = false, 
                DeserializeDetailsViewDefinition = false, 
                DeserializeGroupSummaries = false, 
                DeserializeSorting = false, 
                DeserializeStackedHeaders = false, 
                DeserializeTableSummaries = false, 
                DeserializeUnBoundRows = false 
            };

 
 
You can refer the below UG link to know more about Serialization and Deserialization in SfDataGrid,  
Regards,
Sowndaiyan  


Gianni Ghezzi
Replied On August 10, 2016 12:00 PM

Very Great and very simple! It saved me a lot of time!
Very thanks for your great products and wonderful support!

Sowndaiyan Paulpandi [Syncfusion]
Replied On August 11, 2016 05:07 AM

Hi Gianni

Thanks for the update.

Please let us know if you need further assistance. 
Regards, 
Sowndaiyan  


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;