Extjs怎么给Grid增加一个CheckBox列

 

   1:  var extWindowDepartmentList = new Ext.grid.GridPanel ({autoFill : true,
   2:          autoHeight : true,
   3:          cm : new Ext.grid.ColumnModel([new Ext.grid.CheckboxSelectionModel ({singleSelect : false}),//checkbox 列    
   4:  {dataIndex : 'AreaID',header : '地区',hidden : false,sortable : false},            
   5:  {dataIndex : 'Dept_Name',header : '部门',hidden : false,sortable : false},            
   6:  {dataIndex : 'Id',header : 'Id',hidden : true,sortable : false}
   7:  ]),
   8:          height : 500,
   9:          sm : new Ext.grid.CheckboxSelectionModel ({singleSelect : false}) //这里必须有
  10:  ,
  11:          store : new Ext.data.Store ({autoLoad : true,id : 'StoreDepartmentList',proxy : new Ext.data.HttpProxy ({url : '/Department/List'    }), //数据源
  12:          reader : new Ext.data.JsonReader ({fields : [{type : 'auto'    },{name : 'AreaID',    type : 'auto'},{name : 'Dept_Name',type : 'auto'},    {name : 'Id',type : 'auto'}]})
  13:   
  14:      })
  15:   
  16:      });

你可能感兴趣的:(header,url,ExtJs,autoload)