配置可以选择批量记录的grid---Ext.grid.EditorGridPanel

来源:互联网 发布:小米4 备份数据至u盘 编辑:程序博客网 时间:2024/05/22 14:48

这个需要注意的就是下面粗体的地方。多一个SM。这个SM就是CheckboxSelectionModel。将这个配置到ColumnModel中。表格就成为可以选择的了。//grid的checkbox要配置的选项var sm=new Ext.grid.CheckboxSelectionModel();  //表格的cm属性.这里将sm设置在里头   var cm=new Ext.grid.ColumnModel([sm,    {header:'功能名称',dataIndex:'1'},    {header:'URL',dataIndex:'2'},    {header:'类型',dataIndex:'3'},    {header:'显示位置',dataIndex:'4'},    {header:'LOAD加载',dataIndex:'5'},    {header:'激活状态',dataIndex:'6'},    {header:'是否弹出',dataIndex:'7'}]);     //可编辑的表格    var grid = new Ext.grid.EditorGridPanel({       width:600,       height:200,       cm:cm,       sm:sm    });

效果截图: