Set filter value to title window
Thank you for contacting Syncfusion support,
We have analyzed your query. You can get the Filters from FilterPredicates in particular column. You can set the window title as Filter value of particular column. In this example we have set the window title for EmplyeeArea FilterValue as title. Please refer the below code snippet.
Code snippet[C#]:
void datagrid_Loaded(object sender, RoutedEventArgs e) { if(this.datagrid.Columns["EmployeeArea"].FilterPredicates.Count >0) { this.Title = this.datagrid.Columns["EmployeeArea"].FilterPredicates[0].FilterValue.ToString(); } } |
We have prepared the sample base on your requirement and you can download it from below location
Sample Location: SfDataGridSample_Filter.zip
Please let us know if you have any other queries,
Regards,
Saravanan.M

Attachment: SfDataGridSample_Filter_de0f41db.zip
Thank you for your update,
We have analyzed your query, By default if you UnChecked one or only few items from FilterPopupItems, we use FilterType to NotEquals of UnCheckItems instead of using Equals of all the CheckedItems for performance of FilterControl. So UnChecked items are added as FilterPredicates. You can overcome this by setting FilterType to Equals in FilterChanging event. Now you will get the Selective FilterValue as you expected. Please refer the below code snippet
Codesnippet[C#]:
void datagrid_FilterChanging(object sender, Syncfusion.UI.Xaml.Grid.GridFilterEventArgs e) e.FilterPredicates.Add(new FilterPredicate() { FilterValue = item.ActualValue, FilterType = FilterType.Equals, FilterBehavior = FilterBehavior.StronglyTyped, IsCaseSensitive = true, PredicateType = PredicateType.And |
We have modified the sample based on this and you can download it from following location,
Sample Location: SfDataGridSample_Filter_Modified.zip
Please let us know if you have any other queries,
Regards,
Saravanan.M

Hi Oleg,
Thanks for your update,
We have analyzed your query. You can achieve your requirement by setting AllowFiltering to Fasle for other columns also you need to set AllowFiltering to True for EmployeeArea column to show the Filter. Please refer the below code snippet.
Code snippet[XAML]:
<Syncfusion:SfDataGrid.Columns> <Syncfusion:GridTextColumn AllowFiltering="False" MappingName="EmployeeName" /> <Syncfusion:GridTextColumn AllowFiltering="False" MappingName="EmployeeAge" /> <Syncfusion:GridTextColumn AllowFiltering="True" MappingName="EmployeeArea" /> <Syncfusion:GridTextColumn AllowFiltering="False" MappingName="EmployeeGender" /> <Syncfusion:GridTextColumn AllowFiltering="False" MappingName="EmployeeSalary" /> <Syncfusion:GridTextColumn AllowFiltering="False" MappingName="Rating" /> </Syncfusion:SfDataGrid.Columns> |
We have modified the sample based on this and you can download it from following location,
Sample Location: SfDataGridSample_Filter_ForColumn.zip
You can also refer the below documentation link to know more about SfDataGrid,
Documentation Link: https://help.syncfusion.com/wpf/welcome-to-syncfusion-essential-wpf
Please refer the below KB link for SfDataGrid,
KB Link: https://www.syncfusion.com/kb/wpf/sfdatagrid
Please let us know if you have any other queries,
Regards,
Saravanan.M
We have analyzed your query . You can achieve your requirement by overriding SerializationController with Custom SerializationController. You can override the RestoreColumnProperties method in CustomSerializationController and this method will call , when you DeSerialize the DataGrid. Here you can disable the Filter based on the MappingName. Please refer the below code snippet to achieve your requirement.
Code snippet[C#]:
| this.datagrid.SerializationController = new SerializationControllerExt(this.datagrid); public class SerializationControllerExt : SerializationController { . . . protected override void RestoreColumnProperties(SerializableGridColumn serializableColumn, GridColumn column) { if (serializableColumn.MappingName != "EmployeeArea") serializableColumn.AllowFiltering = false; base.RestoreColumnProperties(serializableColumn, column); } . . . |
We have prepared the sample based on this and you can download it from following location,
Sample Location:SfDataGridSample_Filter_Serialization.zip
You can also refer the below documentation link to know more about overriding SerializationController,
Documentation Link: https://help.syncfusion.com/wpf/welcome-to-syncfusion-essential-wpf
Regards,
Saravanan.M
Thank you for your update. Please let us know if you require any other assistance on this.
Regards,
Saranya
- 9 Replies
- 3 Participants
-
OL Oleg
- May 23, 2015 11:42 AM UTC
- May 28, 2015 06:08 AM UTC