PDA

View Full Version : Ext.grid.CheckColumn is not a constructor



poojagarg89
24 Feb 2012, 3:01 AM
I want a grid with columns having checkboxes so I used CheckColumn.js file which I embeded in my JSP page and my code is



var permissions_inventory_displaycheck = new Ext.grid.CheckColumn({id:'display1',header: 'Display',align:'center',sortable: true,dataIndex: 'display',width: 100});
var permissions_inventory_newcheck = new Ext.grid.CheckColumn({id:'new11',align:'center',header: "New",width:100, sortable: true, dataIndex:'new1'});
var permissions_inventory_editcheck = new Ext.grid.CheckColumn({id:'edit1',align:'center',header: "Edit",width:100, sortable: true,dataIndex:'edit'});
var permissions_inventory_deletecheck = new Ext.grid.CheckColumn({id:'delete1',align:'center',header: "Delete",width:100, sortable: true, dataIndex:'delete'});
var permissions_inventory_allcheck = new Ext.grid.CheckColumn({id:'all1',align:'center',header: "All",width:100, sortable: true,dataIndex:'all'});
var permissions_inventory_colmod=new Ext.grid.ColumnModel([{id:'modules1',align:'center',header: "Modules",width:100, sortable: true, dataIndex:'modules'},
permissions_inventory_displaycheck,
permissions_inventory_newcheck,
permissions_inventory_editcheck,
permissions_inventory_deletecheck,
permissions_inventory_allcheck
]);

var permissions_inventorygrid=new Ext.grid.EditorGridPanel({
id:'permissions_inventorygrid',
layout:'fit',
store:permissions_inventory_ds,
cm:permissions_inventory_colmod,
clicksToEdit:1,
title:"Inventory",
width: 200,
height:180,
plugins:[permissions_inventory_displaycheck,permissions_inventory_newcheck,permissions_inventory_editcheck,permissions_inventory_deletecheck,permissions_inventory_allcheck],
anchor:'1',
frame:true,
loadMask: true,
viewConfig:
{
forceFit:true
},
collapsible: false,
animCollapse: false,
stripeRows:true,
autoScroll:true,
iconCls:'icon-grid'
});



when I am executing my application it is giving me error in firebug as

Ext.grid.CheckColumn is not a constructor
new Ext.grid.CheckColumn({id:'display1',header: 'Display',align:'center',sortable: true,dataIndex: 'display',width: 100});


What can I do in that please help me out :((

Thanks in advance!!
Pooja Garg

mitchellsimoens
24 Feb 2012, 11:30 AM
Ext.ux.grid.CheckColumn is not part of the framework. You will have to load the file and it's location is in the examples/ux/CheckColumn.js

poojagarg89
24 Feb 2012, 10:52 PM
Yaa I did n my issue resolved :)