clear excel-like filter selections programmatically

2 posts, 0 answers
  1. Ryan
    Ryan avatar
    8 posts
    Member since:
    Apr 2018

    Posted 31 Jul 2018 Link to this post

    Hi, 

    if I have an excel-like filter with a few items selected as shown in the attached image, is there any way to programmatically unselect all the values from the listbox? I am using this code to explicitly clear the filter and it works for clearing the radgrid but it does not clear the filter listbox selections:

     

    foreach (GridColumn column in grid.MasterTableView.Columns)           

     {                

           column.CurrentFilterFunction = GridKnownFunction.NoFilter;               

            column.CurrentFilterValue = string.Empty;           

     }            

    grid.MasgterTableView.FilterExpression = string.Empty;            

    grid.Rebind();

  2. Eyup
    Admin
    Eyup avatar
    4018 posts

    Posted 03 Aug 2018 Link to this post

    Hi Ryan,

    You can achieve this requirement by setting the ListOfFilterValues collection of the columns to null:
    https://www.telerik.com/support/kb/aspnet-ajax/grid/details/how-to-clear-radgrid-filters

    I hope this will prove helpful.

    Regards,
    Eyup
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top