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

2 posts, 0 answers
  1. Jamie
    Jamie avatar
    2 posts
    Member since:
    Jan 2015

    Posted 03 Jan Link to this post

    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?

  2. Stefan
    Admin
    Stefan avatar
    595 posts

    Posted 05 Jan Link to this post

    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 visualization (charts) and form elements.
Back to Top