View Full Version : Save grid state problems with plugins like GridFilters and CheckColumn

12 Apr 2010, 5:17 AM

I'm currently trying to add an HttpProvider to save my grids states all over my app. It's working very well and very simply, but I'm facing 2 problems when I try to save filters and checkColumn states.

1) First problem : CheckColumn.

The CheckColumn from the edit grid example http://www.extjs.com/deploy/dev/examples/grid/edit-grid.html is a little renderer that adds mousedown event to check/uncheck checkboxes.

Now, let's say that I move my check column that was in 3rd place, to the 1st place. The state is saved, and I'm reopening my grid to see what happend.

When I call :

Ext.state.Manager.getProvider().initState([here are my params...]);

I can see that my grid ColumnModel is good : the check column appears in 1st place in this object definition. But on my screen, the column hasn't moved. So I think I'm forgetting something like a refresh ? (Tried gridView() refreshes at different places but didn't seems to work.)

2) My second problem : GridFilters.

It's a good plugin that adds filters to the column header menu. They are well saved by the provider, but when I try to restore the state I get this error :

grid.filters.filters is undefined

I'm stuck here for about 2 days and I wanted to know if someone could give me a clue. I searched a lot and didn't find anything about that.

If it can help, here is my provider, and grid definition

Ext.state.Manager.setProvider(new Ext.ux.state.HttpProvider({


var grid = new Ext.grid.EditorGridPanel({
store : dslistOT_1271076665867,
sm : sm,
cm : cm,
stateId: 'listOT',
stateful: true,
stateEvents: ['columnmove', 'columnresize'],
clicksToEdit : 2,
stripeRows : true,
region : 'center',
loadMask: true,
view : new Ext.grid.GroupingView({
forceFit : true,
templates: {
header: headerTpl
groupTextTp1 : '{text} ({[values.rs.length]} {[values.rs.length > 1 ? "Items" : "Item"]})'
enableColumnHide : true,
plugins : [filters,checkColumnot_pep]

Thank you,