View Full Version : [CLOSED] setValue for FilterHeader in code behind

Aug 04, 2014, 12:03 PM

In the example http://examples2.ext.net/#/GridPanel/FilterHeader/Overview/ there is a button where a filter is set.
Is it possible to use setValues in the C# or VB code just like in this javascript code?

I tried somthing like the following code but no success:

protected void btnLoadFilter_Click(object sender, EventArgs e)
Dictionary<string, object> dict1 = new Dictionary<string, object>();
dict1.Add("Company", "!Inc.");

May be my idea to get this done is too simple?

Purpose is to apply this in an application where I combined a Gridfilter with Infinite scrolling. Data come from a mySQL database table and is bound in the pageload. But it is also neccesary to insert records. After inserting a record and binding the data again the filter is cleared. So I want to re-apply the filter.


Aug 04, 2014, 12:24 PM

I tried your code snippet and it works for me. SetValue method works fine and ApplyFilter is not required in this case

Aug 04, 2014, 3:03 PM
Hi Vladimir,

You're right: it works.
Sorry, my mistake. Normally I add a click handler with:

<Click OnEvent="btnLoadFilter_Click"></Click>

But this time I took OnClick= "btnLoadFilter_Click" in the ext:Button.
That should be OnDirectClick.

The issue of getting the data filtered after inserting a new record and binding the data again could be implemented by adding


Thanks, Hans