//主信息
new Ext.grid.EditorGridPanel({
region:'center',
id:'ext-page',
title:'组信息',
clicksToEdit:1,
sm: new Ext.grid.CheckboxSelectionModel(),
store: this.store,//组信息数据源
tbar: ['-',{text:'新建',iconCls:'addCls',handler:this.addRecordRow}],
columns: [new Ext.grid.RowNumberer(),
new Ext.grid.CheckboxSelectionModel(),
{header:'小组名称' ,dataIndex:'sm',sortable:true,width:180
,editor: new Ext.form.TextField({allowBlank:false}) }],
listeners:{ afteredit: this.modifyField ,rowclick:this.tmpModel }
}),//子信息
new Ext.grid.EditorGridPanel({
region: 'south',
height:350,
minHeight:250,
maxHeight:280,
autoScroll:true,
collapsible:true,
id:'ext-page-son',
title:'组员信息',
clicksToEdit:1,
sm: new Ext.grid.CheckboxSelectionModel(),
store: this.store_group,//组员信息数据源
tbar: ['-',{text:'新建',iconCls:'addCls',handler:this.addRecordRow}],
columns: [new Ext.grid.RowNumberer(),
new Ext.grid.CheckboxSelectionModel(),
{header:'小组名称' ,dataIndex:'sm',sortable:true,width:180
,editor: new Ext.form.TextField({allowBlank:false}) },
{header:'组员',dataIndex:'personname',sortable:true,width:120 }],
listeners:{ afteredit: this.modifyField }
})
store_group: new Ext.data.XmlStore({
autoDestroy: true,
url:"../gridRecordsActionByXML_group",
record: 'record',
idPath: 'id',
autoLoad: params:{ id:1 },
fields: [
{name:"id",mapping:'id',type:'int'},
{name:"sm",mapping:'sm'},
{name:"personname",mapping:'personname'},
{name:"personid",mapping:'personid'}
]
}),
[code="javascript"]
store_group.load({
params:{id:idValue}
});
[/code]