SitePen/dgrid — Issue #63: Column Headers disappearing on browser resize
Author: alexmancini
Created: 2012-01-16 06:36:55+00:00
State: open

I noticed an issue with OnDemandGrid's column headers disappearing when the browser window is resized. Specifically, grids that are loaded in non-focused tabs of a dijit.layout.TabContainer.

Steps to reproduce:
1. Load test/dijit_layout.html in your browser.
2. Open Tab 1 and Tab 2 to verify that the column headers are visible.
3. Resize your browser window.
4. Select the other tab.
5. The column headers are no longer visible.
6. Resize the browser window again and the column headers will reappear.

This was tested with a clean checkout of the dgrid master branch and the latest versions of Firefox, Chrome, and Opera.

If anyone else is running into this issue, it is possible to work around by explicitly calling the grid's resize method in your ContentPane's show event handler. For example, if you're using a dojox.layout.ContentPane, set its scriptHasHooks property to true and try something like:

require(['dojo/on', 'foo/MyGrid'], function(on, Grid) {
var myGrid = new Grid(...);

on(_container_, 'show', function() {
myGrid.resize();
});
}