【发布时间】:2014-03-18 09:20:50
【问题描述】:
我是 extjs 新手,我在网格过滤器上使用 extjs3.2。过滤器在每个标题下正确显示,但它不是过滤器
var store = new Ext.data.Store({
id : 'user',
autoDestroy: true,
url: 'site/view.action',
proxy : proxy,
reader : reader,
writer : writer, // <-- plug a DataWriter into the store
// just as you would a Reader
autoSave : false,
// <-- false would delay executing create, update, destroy
// requests until specifically told to do so with some [save]
// buton.
});
这是我的 GridFilter 代码
var filters = new Ext.ux.grid.GridFilters({
encode: true, // json encode the filter query
local: false,
filters:[
{type: 'string', dataIndex: 'sapid'},
{type: 'numeric', dataIndex: 'orgid'},
{type: 'string', dataIndex: 'companyCode'}
]});
这是我的 GridPanel 代码
var grid = new Ext.grid.GridPanel({
store : store,
disableSelection: true,
id : "documentsGrid",
columns : [{
header : "SAP ID",
width : 120,
sortable : true,
dataIndex : 'sapid',
filter: {
//type: 'numeric' // specify type here or in store fields config
},
filterable: true,
renderer: function (value, metaData, record, rowIndex, colIndex, store) {
return getToolTip(value, metaData, record, rowIndex, colIndex, store);
},
editor : {
xtype : 'textfield',
allowBlank : true
}
},
plugins: [editor,filters],
有什么问题我无法理解
请帮忙
谢谢
【问题讨论】: