PDA

View Full Version : Style error in grid docked container



biohazardo
15 Feb 2012, 11:52 PM
There is grid component with docked container.

...
dockedItems: [{ xtype:'container',
html:'truehtml',
id:'summaryBlock',
dock:'bottom',
layout:'fit'
}], ...
In first show of the grid everything is fine. But when I want to see it in second time it throws:
Uncaught TypeError: Cannot read property 'style' of undefined
That error goes to this ExtJS code (Ext-all-debut.js line: 8908)

...setHeight : function(height, animate){ var me = this;
height = me.adjustHeight(height);
if (!animate || !me.anim) {
me.dom.style.height = me.addUnits(height);http://www.sencha.com/forum/chrome-devtools://devtools/Images/errorIcon.pngUncaught TypeError: Cannot read property 'style' of undefined



}
else...
What is it and how to fix?

vietits
16 Feb 2012, 12:26 AM
How do you switch from first show to second show?

biohazardo
16 Feb 2012, 12:35 AM
How do you switch from first show to second show?

The are Viewport and Menus. When I click the button, in that Viewport content place creating my own class, and I see it. That content, that was there just replacing. And when I want to load it again - it throws this error. Everything with ajax and new ExtJS4 class system with autoload.

vietits
16 Feb 2012, 2:06 AM
Hmm. I think it must have some differences between the first time and the second time but it seems that there is not enough information to guess. It's difficult to say without looking at your code.

biohazardo
16 Feb 2012, 2:22 AM
Hmm. I think it must have some differences between the first time and the second time but it seems that there is not enough information to guess. It's difficult to say without looking at your code.

I solve that problem, by creating adding docked item from class, that want to create this container, and not from grid class. But the reason of error is mystic for me...