문제

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

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top