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

Grid filter controls not updated when dataSource filters removed for some filter operators

1 Answer 64 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jamie
Top achievements
Rank 1
Jamie asked on 03 Jan 2017, 11:45 PM

http://dojo.telerik.com/iwepo/5

In the grid I have a filterable date column with IsNull and IsNotNull operators.  Above the grid I have a button which clears all the dataSource filters.

This works fine if you set the date column to be filtered on a value, e.g. is before / today's date.

However, if you choose the IsNull or IsNotNull operator, and then click the Clear filters button, the dataSource is indeed unfiltered, but the grid filter controls are NOT updated (the clear button remains visible, and the dropdown still has that operator selected).

This appears to affect IsNull, IsNotNull, IsEmpty, and IsNotEmpty, across all data types (number, date, text).

Is there some reason the filter controls are only updated when removing some (but not all) operators?

1 Answer, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 05 Jan 2017, 03:35 PM
Hello Jamie,

Indeed the grid.dataSource.filter([]) affects only the dataSource and is not supposed to clear the filter menu forms, as that functionality is not supported out of the box.

I can suggest using jQuery to trigger the click event of the clear button:

http://dojo.telerik.com/IyufO

Please have in mind that depending on the number of Grids on the page and of the used filter menu the jQuery selector can vary.

Regards,
Stefan
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data (charts) and form elements.
Tags
Grid
Asked by
Jamie
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Share this question
or