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

How do I clear the built in filters?

4 Answers 346 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 14 Nov 2011, 05:39 PM
Using a RadGrid in C#. I have a reset button (since there is no built in one). I can't figure out how to clear the filters though. I have tried a number of things but can't figure it out.

4 Answers, 1 is accepted

Sort by
0
Accepted
Alexander
Telerik team
answered on 17 Nov 2011, 03:33 PM
Hello Matt,

You can clear the FilterDescriptors collection of RadGridView:
this.radGridView1.FilterDescriptors.Clear();

I hope it helps.

Best regards,
Alexander
the Telerik team

Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

0
Deasun
Top achievements
Rank 3
Iron
Iron
Iron
answered on 01 Jul 2019, 02:05 PM

I just noticed that after doing this;

this.radGridView1.FilterDescriptors.Clear();

if the focus is still in the filter value box it does not seem to clear that value out.

Even though the grid rows itself does seem to return the full non filter rows.

 

0
Dimitar
Telerik team
answered on 02 Jul 2019, 10:56 AM
Hello Deasun,

You need to make sure that the grid is not in edit mode when this is done:
if (radGridView1.IsInEditMode)
{
    radGridView1.EndEdit();
}
 
radGridView1.FilterDescriptors.Clear();

I hope this helps. Should you have any other questions, do not hesitate to ask.
 
Regards,
Dimitar
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.
0
Deasun
Top achievements
Rank 3
Iron
Iron
Iron
answered on 02 Jul 2019, 03:27 PM
Thanks.
Tags
GridView
Asked by
Matt
Top achievements
Rank 1
Answers by
Alexander
Telerik team
Deasun
Top achievements
Rank 3
Iron
Iron
Iron
Dimitar
Telerik team
Share this question
or