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

[Solved] Remove All Filters

1 Answer 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
kencox
Top achievements
Rank 1
kencox asked on 16 Jul 2009, 03:01 PM

I have a Reset button that should remove all filters - clearing the textbox as well as setting the menu to No Filter.

The problem is that I can only remove the text and the filter choice from one column. Here's a sample that works as expected:

 

function RemoveFilters() { 

 

var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

 

 

masterTable.filter("Description", "", Telerik.Web.UI.GridFilterFunction.NoFilter);

 

 

}

 

 

However, when I try to add another column, the reset fails. This fails:

 

 

function RemoveFilters() {

 

var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();

 

 

masterTable.filter(

"PartNumber", "", Telerik.Web.UI.GridFilterFunction.NoFilter);

 

 

 masterTable.filter(

"Description", "", Telerik.Web.UI.GridFilterFunction.NoFilter);

 

 

}

Any idea how to fix this?

Ken
Microsoft MVP ASP.NET

 

 

1 Answer, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 20 Jul 2009, 08:30 AM
Hi Ken,

I am afraid that the desired functionality could be hardly achieved on client side.
If you need reset button  that should removes all filters I suggest you refer to the following online demo which elaborates on this subject.
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandcombo/defaultcs.aspx?product=grid

All the best,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
kencox
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Share this question
or