View Full Version : Add items to grid within another tab

24 Aug 2011, 10:21 PM
Hi I have a strange problem:

Ext.create('GGZ.view.Viewport', {
style : {
background : '#ffffff'
items : [ {
xtype : 'toptoolbar',
region : 'north'
}, {
xtype : 'filterpanel',
region : 'west'
}, {
// xtype: 'panel',
id: 'contenttabpanel',
xtype: 'tabpanel',
itemId: 'mainTabPanel',
itemId: 'ggmarkettab',
title: 'GG-Markt',
xtype : 'contentlistpanel', // is a gridpanel and standard tab that is opened
autoScroll: true
xtype: 'listen_dashboard', // is a panel that contains a panel and a grid in a vbox layout
itemId: 'listendashboard',
title: 'Listen'
region : 'center'
} ]

both grid have stores for their own without any refrences.

When I only look at the "ggmarkettab" grid everything is fine.

What I do is selecting several rows in the "ggmarkettab" grid. then i click on a button. on click of this button all selected records are added to the store of the grid that is within the other tab that is not shown is that moment.

(i check here if the records are added correctly to the store -> yes)

now i change the activetab. I see the rows in the grid that i added some seconds ago but the problem is:

there is no scrollbar (the grid has a height of around 400px and contains more than 100 rows). [screenshot attached]

so now i thought: "hmm maybe if have to refresh the grid or to layout it again".
tested but the result was much more confusing: the scrollbar now apears but the gridbody is not at the position where it should be. between the columnheader and the first data row is an empty row (created by extjs via "top" style property). [screenshot attached]

so now: what can i do to fix this? i work on this issue for 2 days and does not find any solution.

EDIT: I tested with 4.0.1 and it works correctly but other things does not work: e.g. "itemcontextmenu" event for the grid does not get the xy coordinates for the click. this happen because the event (e) that is given as argument to the listener function, is a "mouseout" and not a "mousedown" event.

thanks in advice

27 Aug 2011, 7:22 AM
I don't know about this specific issue but I know that scrollbars in general have been a big problem in ExtJS 4. Big improvements are expected in 4.0.6 and 4.1. Last week the 4.0.6 release was prevented by a bug with grid scrolling.

28 Aug 2011, 11:41 AM
that sound like "Dont use ExtJs 4 because a base feature is not working" -.-
the problem is that my whole application is based on extjs 4 and now after about 1,5 months of work i can not develop anymore because the things i need dont work :(

is there a release date for extjs 4.1?

28 Aug 2011, 12:47 PM

I find it hard to believe that a scrollbar issue makes it impossible for you to continue development.

All software contains bugs. Working around the bugs in the libraries you use is part of being a software developer. Given the choice between working around ExtJS bugs or trying to achieve the same effect without it I know which I'd pick.