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:      });

좋은 웹페이지 즐겨찾기