//主信息
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 }
})
点击组长后调用:tmpModel方法
tmpModel:function(){
var idsObj = Ext.getCmp('ext-page' ).getSelectionModel().getSelected();
alert(idsObj.get('id'));//获取组信息表的ID
}
请问,在这个方法里,我想把store_group的数据重新加载,
要加入idsObj.get('id')条件查询后的结果,再显示在ext-page-son的grid中,
应该怎么写呢???谢谢.
问题补充
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'}
]
}),
autoLoad: params:{ id:1 },
默认时来会取ID:1的数据,
我想点击其他GRID时,获取ID,可是怎么动态更新params:{ id:<这个参数值> }呢???
新手上路,请各位高手多多指教吖>.<"
谢谢啦!