Search code examples
extjsextjs-gridextjs2

Cannot display checkbox in grid using Ext.grid.CheckColumn Extjs Version 2.2


When I am trying to add a check column to the grid using below codes

this.entitlementColModel = new Ext.grid.ColumnModel([new Ext.grid.RowNumberer(), {
        header : 'CIF',
        dataIndex : 'cif',
        width : 80,
        editor : new Ext.form.TextField({
                    maxLength : 20,
                    allowBlank : false
                }),
        editable : true
    }, new Ext.grid.CheckColumn({
        header: 'AML',
        dataIndex: 'amlActive',
        resizable:false,
        width: 25,
        onMouseDown : function(e, t){}
    })]);

Getting the below error

Uncaught TypeError: Ext.grid.CheckColumn is not a constructor

Also tried xtype: 'checkcolumn',

It is also not working. I can't upgrade ext version currently. Is there any replacement for this method in version 2.2 ?


Solution

  • use action column { xtype: 'checkcolumn', text: 'Active', dataIndex: 'active' }