Clear Filter not working properly

5 posts, 0 answers
  1. Jageshwar Nakey
    Jageshwar Nakey avatar
    1 posts
    Member since:
    Mar 2010

    Posted 14 Jan 2011 Link to this post

    Hi,

    I have enabled the standard column filters on the RadGridView. I have a column which contains a date. When I click on the Filter icon and add a date in the filter expression (operator as default 'Is equal to') and click on Filter button - this works ok. Now when I click on Clear Filter, the date expression does not get cleared - date turns to DateTime.MinValue and all the records do not show up in the grid.
    Clear Filter button should clear all the filter expressions user has entered and show all the records in the grid - any help on this will be highly appreciated. BTW I am using Telerik 2009.3.1208.1030 controls for silverlight.
  2. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 14 Jan 2011 Link to this post

    Hello Jageshwar Nakey,

    There was such a bug, but we fixed it a very very long time ago. Can you please upgrade to the latest version, since the one that you are using is more than a year old.

    In case you experience any problems with the latest version, please let us know.

    All the best,
    Ross
    the Telerik team
    Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
  3. Stephan
    Stephan avatar
    12 posts
    Member since:
    Jun 2011

    Posted 27 Mar 2012 Link to this post

    Hi Ross,

    I see probably the same problem in WPF Grid 2012.Q1. build 0306
    I have an Int32 Column.
    I open the filter and select a value out of the list, e.g. -84 (see screnshot 1)
    Then I press my "clear all filters" button, which does

    radGridView1.FilterDescriptors.Clear();

    It worked fine, all rows are displayed.
    Then I open the filter dialog again, but the value "-84" is still selected. Should be unchecked.

    Best regards
    Torsten

  4. Rossen Hristov
    Admin
    Rossen Hristov avatar
    2477 posts

    Posted 27 Mar 2012 Link to this post

    Hi,

    Are you using the stock filtering control or you have developed your custom filtering control? Because the stock filtering control clears column filters like this:

    this.radGridView.FilterDescriptors.SuspendNotifications();
    foreach (Telerik.Windows.Controls.GridViewColumn column in this.radGridView.Columns)
    {
        column.ClearFilters();
    }
    this.radGridView.FilterDescriptors.ResumeNotifications();

    In case you are clearing the filters manually, you have to use the above code. 

    Simply calling RadGridView.FilterDescriptors.Clear will indeed remove the filtering, but the column filters will preserve their settings (although they will not be part of the FilterDescriptors collection). To completely clear a column filter you have to call column.ClearFilters(); 

    In case you are having trouble with the stock filtering control, could you please send us a small dummy project that demonstrates this issue and we will debug it right away.

    All the best,
    Ross
    the Telerik team
    Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
  5. Stephan
    Stephan avatar
    12 posts
    Member since:
    Jun 2011

    Posted 27 Mar 2012 Link to this post

    Hi Ross,
    thanks alot !!!
Back to Top