Reputation: 1258
I am using a plugin in extjs grid to filter data. This is working great but what i miss is that the selection i made are stored. So when i refresh the browser the settings are lost. How can i store this?
i use this
var filtersFeature =
{
ftype : 'filters',
stateful: true,
local : true, // For Server Side Filtering
encode : true
};
and in a column i use this options
filterable: true,
filter: {
type: 'list',
store: onlineStore
},
but that is not working. How can i store the settings of the filters. I use the filter at a couple of columns
Upvotes: 0
Views: 3762
Reputation: 4431
Every state object needs a stateId aswell.
http://docs.sencha.com/ext-js/4-1/#!/api/Ext.ux.grid.FiltersFeature-cfg-stateId
var filtersFeature =
{
ftype : 'filters',
stateful: true,
local : true, // For Server Side Filtering
encode : true,
stateId: 'gridXFilters'
};
And keep in mind that you need some kind of state manager. Like cookie state manager or your own implementation.
At a previous project I stored states in database every 30 seconds, and beforebrowser close.
Upvotes: 2