PDA

View Full Version : hide/show grid (clas w autoScroll) on border layout center having east regi - SCROLLS



Webtel
10 Aug 2012, 12:34 AM
Hello,

Im using ExtJS 4.1.1. and I have a problem with a grid of a class like in example (autoScroll:true).

After placing it in center region (east is populated also) and after hide and show(items in both regions), the grid shows bad scrolls.

How can i remove thise scrolls or fix this issue otherwise? (do ComponentLayout() nor getView().doComponentLayout() works on this)....

PS. setting autoScrol false in grid instance have no influence. what am i doing wrong here?




Ext.define('TS.lib.Grid', {
extend: 'Ext.grid.Panel',alias:'widget.grid',autoScroll:true});


Ext.create('Ext.Window',{autoShow:true, width:400,autoDestroy:true, height:300,layout:'border',
items:[
{xtype:'grid',name:'me',region:'center',columns:[],autoScroll:false,
store:Ext.create('Ext.data.Store',{fields: ['a']})},
{region:'east',width:200,name:'me',xtype:'form'}
]
});


Ext.ComponentQuery.query('grid[name=me]')[0].hide();
Ext.ComponentQuery.query('form[name=me]')[0].hide();
Ext.Function.defer(function(){
Ext.ComponentQuery.query('grid[name=me]')[0].show();
Ext.ComponentQuery.query('form[name=me]')[0].show();
},500);

Tthanks for help upfront.