开发者

Extjs 4 FiltersFeature vs stateful grid

I have a grid with some columns with filters. columns defination:

columns:[{
                text: "Number",
                dataIndex: 'clientreference',
                width: 200,
                filter: true,
                sortable: true
            },

here i开发者_如何学JAVAs filter feature defination

features: [{
                ftype: 'filters',
                encode: true,
                local: false
            }],

The problem is: When i'm trying to save state of grid, filters are not working: When I adding this code to a grid:

stateful: true,
stateId: 'documentsGrid',

I refresh the page and all works fine, because i dont have state in my cookies. But when I refresh the page second time - state loads from cookies and filters are not working. If i remove stateful: true and refresh page, filters are working fine. Any suggestions? Also I noticed, that all examples in extjs site are only with filters or with stateful grid, but there is no one example with both.

UPDATED: The most useful way was making my own method for saving state of elements I need and to restore it.


I think you are specifying features in grid.But you can specify filters in store directly.So try to define filters in store and stateful in grid config options.Hope you may get the solution to come out from this.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜