grid前添加选项框以及多选方式。
var grid = new Ext.grid.Panel({
id : 'goodsInfo-grid',
title : "商品信息表",
overflow : 'auto',
autoScroll : true,
/*
** selType:'checkboxmodel', 单击行就可以选中.
*/
selModel: new Ext.selection.CheckboxModel({checkOnly:true}), //只能点击多选框才可以选中.
multiSelect:true,
height :750,
store : store,
columns : [ {
header : '序列',
xtype : 'rownumberer',
tdCls:'tdValign',
align : 'center',
width : 40
}, {
text : '仓库名称',
dataIndex : 'warehouseName',
tdCls:'tdValign',
align : 'center',
flex : 1,
renderer : gridTip
}
... ...
此处省略其余代码。。。