Hi Kevin,
Thanks for using Syncfusion
Products.
You can achieve your requirement
by serializing and de-serializing FilterPredicate in sample level. We have
created the sample to achieve your requirement. Please find the sample in the
following link.
Sample: http://www.syncfusion.com/downloads/support/directtrac/124663/DataGridFiltering31740703.zip
In this sample we have used SerializeFilters extension
method for serialization operation in that method we serialize the filter
predicate each column and store in xml file. For Deserialization we use DeserializeFilters
extension method, and in that method we de-serialize xml file and set the
filter predicate back to grid columns.
Serialization:
private async void Button_Click_1(object sender, RoutedEventArgs e)
{
try
{
var
folder = KnownFolders.DocumentsLibrary;
var storageFile
= await
folder.CreateFileAsync("Filters.xml", CreationCollisionOption.ReplaceExisting);
this.datagrid.SerializeFilters(storageFile);
}
catch (Exception)
{
//throw;
}
}
|
Deserialization:
private async void Button_Click_2(object sender, RoutedEventArgs e)
{
try
{
var
folder = KnownFolders.DocumentsLibrary;
var
storageFile = await folder.GetFileAsync("Filters.xml");
this.datagrid.DeserializeFilters(storageFile);
}
catch (Exception)
{
//throw;
}
}
|
Please let us know if you have any queries.
Thanks,
Ashok