0
我正在使用extjs网格,我发现对于过滤器,我们必须为remote设置local = false。一旦数据加载到网格中,我希望它从网格中过滤掉,而不是每次都打到数据库。Extjs3.2网格过滤器localy
如何做到这一点?
感谢
我正在使用extjs网格,我发现对于过滤器,我们必须为remote设置local = false。一旦数据加载到网格中,我希望它从网格中过滤掉,而不是每次都打到数据库。Extjs3.2网格过滤器localy
如何做到这一点?
感谢
你试过local: true
财产?如果你设置了local: false
将会工作远程数据。以下是来自Sencha例子的一个例子。
var filters = new Ext.ux.grid.GridFilters({
encode: false, // // configure whether filter query is encoded or not (initially)
local: true, // defaults to false (remote filtering)
filters: [{
type: 'numeric',
dataIndex: 'id'
}, {
type: 'string',
dataIndex: 'company',
disabled: true
}, {
type: 'numeric',
dataIndex: 'price'
}, {
type: 'date',
dataIndex: 'date'
}, {
type: 'list',
dataIndex: 'size',
options: ['small', 'medium', 'large', 'extra large'],
phpMode: true
}, {
type: 'boolean',
dataIndex: 'visible'
}]
});