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

Clear Filter not working properly

4 Answers 273 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Jageshwar Nakey
Top achievements
Rank 1
Jageshwar Nakey asked on 14 Jan 2011, 12:16 PM
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.

4 Answers, 1 is accepted

Sort by
0
Rossen Hristov
Telerik team
answered on 14 Jan 2011, 12:43 PM
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>>
0
Stephan
Top achievements
Rank 1
answered on 27 Mar 2012, 12:51 PM
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

0
Rossen Hristov
Telerik team
answered on 27 Mar 2012, 01:23 PM
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 >>
0
Stephan
Top achievements
Rank 1
answered on 27 Mar 2012, 01:30 PM
Hi Ross,
thanks alot !!!
Tags
GridView
Asked by
Jageshwar Nakey
Top achievements
Rank 1
Answers by
Rossen Hristov
Telerik team
Stephan
Top achievements
Rank 1
Share this question
or