View Full Version : [CLOSED] Grid Filter Default Value

Sep 04, 2013, 8:30 AM

I have a boolean grid filter and want to set that filter's default value as 'False' when grid is loaded.

It supposed to be set 'True' if I set 'True' in grid's filter.

Now, grid loading is 'False' on grid loading but however I set filter to 'True', the grid filter remains the same as 'False'.

Please check the following code. Thanks.

<ext:GridFilters Local="true">
<ext:BooleanFilter DataIndex="IGNORE_FLAG" />

<ext:GridView ID="GridView1" runat="server" StripeRows="true" TrackOver="true">
<Refresh Handler="#{gvInvoiceList}.body.unmask();#{gvInvoiceList}.ge tFilterPlugin().getFilter('IGNORE_FLAG').setValue( true);" Delay="1" />

Sep 04, 2013, 12:40 PM
Hi @canusr1,

Please update from SVN and use:

<ext:BooleanFilter DataIndex="test" Value="false" />


<%@ Page Language="C#" %>

<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

<script runat="server">
protected void Page_Load(object sender, EventArgs e)
if (!X.IsAjaxRequest)
Store store = this.GridPanel1.GetStore();
store.DataSource = new object[]
new object[] { true },
new object[] { false },
new object[] { true }

<!DOCTYPE html>
<head runat="server">
<title>Ext.NET v2 Example</title>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:GridPanel ID="GridPanel1" runat="server">
<ext:Store runat="server">
<ext:Model runat="server">
<ext:ModelField Name="test" Type="Boolean" />
<ColumnModel runat="server">
<ext:Column runat="server" Text="Test" DataIndex="test" />
<ext:GridFilters runat="server" Local="true">
<ext:BooleanFilter DataIndex="test" Value="false" />

If you cannot or do not want to update, please use this fix:

constructor : function (config) {
Ext.apply(this, config);

* @event activate
* Fires when an inactive filter becomes active
* @param {Ext.ux.grid.filter.Filter} this
* @event deactivate
* Fires when an active filter becomes inactive
* @param {Ext.ux.grid.filter.Filter} this
* @event serialize
* Fires after the serialization process. Use this to attach additional parameters to serialization
* data before it is encoded and sent to the server.
* @param {Array/Object} data A map or collection of maps representing the current filter configuration.
* @param {Ext.ux.grid.filter.Filter} filter The filter being serialized.
* @event update
* Fires when a filter configuration has changed
* @param {Ext.ux.grid.filter.Filter} this The filter object.
Ext.ux.grid.filter.Filter.superclass.constructor.c all(this);

this.menu = this.createMenu(config);

if (config && Ext.isDefined(config.value)) {
this.setActive(config.active !== false, true);
delete config.value;

Sep 05, 2013, 2:07 AM
It's working fine now. Thanks for the help. :D