Now I want to add a checkbox column in a gridpanel like this.未命名.jpg
Andbody help me?
Now I want to add a checkbox column in a gridpanel like this.未命名.jpg
Andbody help me?
There is an example here on this page:
http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html
*extract
Code:var sm = Ext.create('Ext.selection.CheckboxModel'); var grid2 = Ext.create('Ext.grid.Panel', { store: getLocalStore(), selModel: sm, columns: [ {text: "Company", width: 200, dataIndex: 'company'}, {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {text: "Change", dataIndex: 'change'}, {text: "% Change", dataIndex: 'pctChange'}, {text: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], columnLines: true, width: 600, height: 300, frame: true, title: 'Framed with Checkbox Selection and Horizontal Scrolling', iconCls: 'icon-grid', renderTo: Ext.getBody() });
There is an example here on this page:
http://dev.sencha.com/deploy/ext-4.0.2a/examples/grid/grid-plugins.html
*extract
Code:var sm = Ext.create('Ext.selection.CheckboxModel'); var grid2 = Ext.create('Ext.grid.Panel', { store: getLocalStore(), selModel: sm, columns: [ {text: "Company", width: 200, dataIndex: 'company'}, {text: "Price", renderer: Ext.util.Format.usMoney, dataIndex: 'price'}, {text: "Change", dataIndex: 'change'}, {text: "% Change", dataIndex: 'pctChange'}, {text: "Last Updated", width: 135, renderer: Ext.util.Format.dateRenderer('m/d/Y'), dataIndex: 'lastChange'} ], columnLines: true, width: 600, height: 300, frame: true, title: 'Framed with Checkbox Selection and Horizontal Scrolling', iconCls: 'icon-grid', renderTo: Ext.getBody() });