View Full Version : Grid column headers not displayed

16 Sep 2013, 5:42 AM
Ok after trying 3 times i hope this time this thread will really be displayed in the forums!!!!


Hey all,

my problem is that the column headers of my grid panel are not shown, dom says their height is set to 0.
I'm using ExtJs 4.2.1, and currently build an app following the mvc-pattern suggested in the docs.
Yet everything works fine, except the column headers.

If i try:

renderTo: Ext.getBody(),

on a sample page without any content, my grid headers are displayed and they got all their nice options for sorting.

Using the exact same code, but assigning the result to a variable:

var grid = Ext.create(...);

and then calling:

var parent = Ext.getCmp('mypanel');

- where mypanel is within the viewport and already rendered - i get NO column headers at all, because they seem to get hidden by ExtJS (their height gets set to 0), the rest of the grid is displayed just fine, sizes are correct and all content ist displayed, even collapsing (columns/panels) works just fine out of the box.

Before you ask, yes I tried using Ext.define before, cause that's the way the docs explained me the mvc pattern, but nonetheless same results. Somehow the grid column headers get rendered to 0 height when using the mvc.

Any hints / solutions on that one? Is there something special about grids when i use the mvc-pattern?
I could of course get the dom-element and set the height directly. But is there a solution directly via the config object?

Thanks in advance!

16 Sep 2013, 1:05 PM
Always post a fully runnable test case, otherwise we can only guess what's going wrong...