Home Forums WPF controls Xceed DataGrid for WPF Complex Filtering – Excel like Filetering in code

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26782 |

    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)

    Xceed Support
    Member
    Post count: 5658

    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)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.