日期:2014-05-16 浏览次数:20667 次
var sm = new Ext.grid.CheckboxSelectionModel(); // ext自带的CheckBox选择列
var cm=new Ext.grid.ColumnModel([
new Ext.grid.RowNumberer(),// 行号列
sm,
{
header:"项目编号",
dataIndex:"itemId",
align:"center",
width:80,
sortable:true,
editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:false}))
},
{
header:"项目值",
dataIndex:"itemValue",
width:180,
sortable:true,
editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:false}))
},
{
header:"排列顺序",
dataIndex:"itemOrder",
align:"center",
width:80,
sortable:true,
editor:new Ext.grid.GridEditor(new Ext.form.TextField({allowBlank:false}))
},
// {
// header:"是否有效",
// dataIndex:"isLocked",
// align:"center",
// width:80,
// sortable:true,
// renderer:function(value){
// return value ? "是" : "否";
// }
//// ,
//// editor:new Ext.grid.GridEditor(new Ext.form.Checkbox({width:40,align:"center"}))
// },
{
header:"项目说明",
dataIndex:"itemRemark",
width:240,
sortable:true,
editor:new Ext.grid.GridEditor(new Ext.form.TextField())
},{
dataIndex:"id",
hidden:true
},
{
dataIndex:"dictTypeId",
hidden:true
}
]);
var gridpanel;
//gridpanel头部工具栏
var gridTbar = new Ext.Toolbar([{
text : "新增",
tooltip : "增加项目",
icon : "../../pic/add-row.gif",
handler : function() {
&