Home › Forums › WPF controls › Xceed DataGrid for WPF › Complex Filtering – Excel like Filetering in code
Can Complex Filtering – Excel like Filetering be done in code not in xaml.
and also Complex sorting in code
Imported from legacy forums. Posted by Rachana (had 465 views)
Auto Filtering (excel like) can be done through the DataGridContext.AutoFilterValues dictionary.
The dictionary allows you to access and modify the list of AutoFilterValues for a given Column`s FieldName.
So, here is a quick sample:
DataGridContext context = DataGridControl.GetDataGridContext( myDataGridControl );context.AutoFilterValues[“myColumnFieldName”].Add( “My new filter value” );
For this to work, AutoFiltering must be enabled as indicated in the product documentation (section Basic Concepts/Manipulating Data/Filtering Data ).
Imported from legacy forums. Posted by Marcus [Xceed] (had 1329 views)