1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    hz_qiuyuanxin is on a distinguished road

      0  

    Default 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: 文字排版

  2. #2
    Ext JS Premium Member
    Join Date
    Mar 2010
    Posts
    23
    Vote Rating
    0
    srknori is on a distinguished road

      0  

    Default


    It is hard to read. Could you place with the code tags.

  3. #3
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,000
    Vote Rating
    456
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    try placing your columns in your initComponent:

    this.columns = [ .. ]

    Scott.

  4. #4
    Sencha Premium Member
    Join Date
    Mar 2011
    Location
    McKinney, TX
    Posts
    40
    Vote Rating
    0
    jbender11 is on a distinguished road

      0  

    Default 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

Thread Participants: 3

Tags for this Thread