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: })
一、用var selections = grid.getSelectionModel().getSelections()取得你选中的行。二、第一行name列的值,selections[0].get("name")
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)