Forum /
Ext JS Community Forums 4.x /
Ext: Discussion /
TypeError: FilterClass is not a constructor
TypeError: FilterClass is not a constructor
My code
[CODE]
/*项目类型*/
Ext.define('Wando.Base.ProjectType', {
extend: 'Ext.grid.GridPanel',
uses: [
'Ext.grid.GridPanel',
'Ext.ux.grid.FiltersFeature'
],
config: {
columns: [
{ xtype: 'rownumberer' },
{ text: '名称', dataIndex: 'name' }
],
store: ProjectTypeStore,
selModel: Ext.create('Ext.selection.CheckboxModel', {}),
loadMask: true
},
initComponent: function () {
this.tbar = [
{ id: 'add', xtype: 'button', text: '添加', handler: this.onAddHandler },
{ id: 'modify', xtype: 'button', text: '修改', handler: this.onModifyHandler },
{ id: 'del', xtype: 'button', text: '删除', handler: this.onDelHandler },
{ id: 'upload', xtype: 'button', text: '上传', handler: this.onUploadHandler }
];
this.bbar = Ext.create('Wando.PagerBar', { store: this.store });
var filters = {
ftype: 'filters',
local: true,
filters: [{
dataIndex: 'name',
type: 'string'
}]
}
this.features = [filters];
this.callParent(arguments);
},
onAddHandler: function () {
Ext.MessageBox.alert("标题", "内容");
},
onModifyHandler: function () {
Ext.MessageBox.alert("标题", "内容");
},
onDelHandler: function () {
Ext.MessageBox.alert("标题", "内容");
},
onUploadHandler: function () {
Ext.MessageBox.alert("标题", "内容");
}
});
[CODE]
QQ截图20121009233339.jpg
Last edited by hz_qiuyuanxin; 9 Oct 2012 at 6:21 PM .
Reason: 文字排版
It is hard to read. Could you place with the code tags.
Sencha - Support Team
try placing your columns in your initComponent:
this.columns = [ .. ]
Scott.
Tab Panel??
Tab Panel??
I see the same problem using Architect 2.2.2. If I remove the tab panel and display the grid on the top level component, it works fine. The Tab panel seems to trigger the error. (At least in my app)
John
Sencha is used by over two million developers. Join the community, wherever you’d like that community to be
or Join Us