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

How to prevent automatic filter from Column filters

1 Answer 137 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kovacs
Top achievements
Rank 1
Kovacs asked on 28 Mar 2011, 12:22 PM
Hi,

I am using a RadGrid with Column filtering enabled.
What i would like to achieve is to Apply all RadGrid column filters at once with a button_click, and somehow disable the automatic refresh for every single column.

I was thinking i could disable the refresh that is getting triggered after setting a column filter, but was unable to do so.

Any help would be appreciated!
Thanks!

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 01 Apr 2011, 08:23 AM
Hello Kovacs,

You can use the following approach:
Applying default filter on initial load

Fore more information about the filter expressions please take a look at this link:
Operating with the FilterExpression of Telerik RadGrid manually

protected void Page_PreRender(object sender, EventArgs e)
{
    if (!Page.IsPostBack)
    {
        RadGrid1.MasterTableView.FilterExpression = @"Int32(it[""CategoryID""]) > 3 && it[""CategoryName""].ToString().Contains(""i"")";
        //...
        RadGrid1.MasterTableView.Rebind();
    }
}


Regards,
Daniel
the Telerik team
Tags
Grid
Asked by
Kovacs
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or