This is a migrated thread and some comments may be shown as answers.

clear excel-like filter selections programmatically

1 Answer 29 Views
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 31 Jul 2018, 08:28 PM

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();

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 03 Aug 2018, 08:55 AM
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.
Tags
Grid
Asked by
Ryan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or