hieu79vn
4 Jul 2012, 6:50 AM
Hi
I have one class griddetail and 2 class panel1 and panel2 who create new and contain one griddetail.
Ext.define('Panel1', {
extend: 'Ext.panel.Panel',
alias: 'widget.Panel1',
initComponent: function () {
Ext.apply(this, {
items: [this.createGridDetail()]
});
........
createGridDetail: function(){ this.detailgrid = Ext.create('widget.threaddetailgrid',{
autoScroll: true,
region: 'south',
split: true,
flex: 2,
minHeight: 150,
});
return this.detailgrid;
},
Ext.define('Panel2', {
extend: 'Ext.panel.Panel',
alias: 'widget.Panel2',
initComponent: function () {
Ext.apply(this, {
items: [this.createGridDetail()]
});
........
createGridDetail: function(){ this.detailgrid = Ext.create('widget.threaddetailgrid',{
autoScroll: true,
region: 'south',
split: true,
flex: 2,
minHeight: 150,
});
return this.detailgrid;
},
onSelect: function(grid, rec) {
this.detailgrid.loadThreadDetail(rec);
},
Ext.define('ThreadDetailGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.threaddetailgrid',
requires: ['Ext.ux.PreviewPlugin', 'Ext.toolbar.Toolbar'],
cls: 'feed-grid',
autoScroll: true,
border: false,
width: 940,
//height: 300,
initComponent: function () {
Ext.apply(this, {
.....
},
loadThreadDetail: function(rec) {
},
In the Panel 2 there is a function onSelect which is called there is an event select a node in a treeview. At that time the detail grid in Panel 2 will be reloaded. The problem is at that moment the detail grid in Panel1 is also reloaded.
Do you know why there is this problem?????
Thank you
I have one class griddetail and 2 class panel1 and panel2 who create new and contain one griddetail.
Ext.define('Panel1', {
extend: 'Ext.panel.Panel',
alias: 'widget.Panel1',
initComponent: function () {
Ext.apply(this, {
items: [this.createGridDetail()]
});
........
createGridDetail: function(){ this.detailgrid = Ext.create('widget.threaddetailgrid',{
autoScroll: true,
region: 'south',
split: true,
flex: 2,
minHeight: 150,
});
return this.detailgrid;
},
Ext.define('Panel2', {
extend: 'Ext.panel.Panel',
alias: 'widget.Panel2',
initComponent: function () {
Ext.apply(this, {
items: [this.createGridDetail()]
});
........
createGridDetail: function(){ this.detailgrid = Ext.create('widget.threaddetailgrid',{
autoScroll: true,
region: 'south',
split: true,
flex: 2,
minHeight: 150,
});
return this.detailgrid;
},
onSelect: function(grid, rec) {
this.detailgrid.loadThreadDetail(rec);
},
Ext.define('ThreadDetailGrid', {
extend: 'Ext.grid.Panel',
alias: 'widget.threaddetailgrid',
requires: ['Ext.ux.PreviewPlugin', 'Ext.toolbar.Toolbar'],
cls: 'feed-grid',
autoScroll: true,
border: false,
width: 940,
//height: 300,
initComponent: function () {
Ext.apply(this, {
.....
},
loadThreadDetail: function(rec) {
},
In the Panel 2 there is a function onSelect which is called there is an event select a node in a treeview. At that time the detail grid in Panel 2 will be reloaded. The problem is at that moment the detail grid in Panel1 is also reloaded.
Do you know why there is this problem?????
Thank you