I have been eagerly waiting for the Grid. I currently have a page that makes extensive use of hidden ContentPanes. I was using os3grid, but wished to switch to an single toolkit. The grid I defined doesn't display in the ContentPane when the style of the ContentPane is changed to "block".
I modified the existing test_grid.html page as a test case.
After clicking the "Show Hidden ContentPane" button the column headings show as only two small boxes.
Here is an excerpt from the code:
dojo.require("dijit.form.Button");
dojo.require("dijit.layout.ContentPane");
dojo.require("dojox.grid.Grid");
dojo.require("dojox.grid._data.model");
dojo.require("dojo.parser");
// a grid view is a group of columns
var view1 = {
cells: [[
{name: 'Column 0'}, {name: 'Column 1'}, {name: 'Column 2'}, {name: 'Column 3', width: "150px"}, {name: 'Column 4'}
],[
{name: 'Column 5'}, {name: 'Column 6'}, {name: 'Column 7'}, {name: 'Column 8', field: 3, colSpan: 2}
]]
};
// a grid layout is an array of views.
var layout = [ view1 ];
function onclick_Showbutton(object){
dojo.byId("Pane").style.display = 'block';
}
dojox.Grid Basic Test

Force the grid to render
Simply put, you have to force the grid to render after making it visible - use: grid.render();
If you were using a container here (e.g. dijit.layout.TabContainer), you could also use onShow function:
<script type="dojo/method" event="onShow">
grid.render();
</script>
<div id="grid" jsId="grid" dojoType="dojox.Grid" model="model" structure="layout">
</div>
Container calls child's onShow when it sets it visible.
For syntax see Understanding The Parser.
Force the grid to render
Maine, I tried your suggestions. Unfortunately, I have still had no luck in correctly displaying the grid.
I still get only two small boxes on the left of the window that correspond to the two header lines. If I click in either box the headings are rendered, since the grid is assuming I want to sort the first columns (Column 0 or Column 5). The rest of the grid doesn't render.
Simply changing the ContentPane from 'display:none' to 'display:block' causes the grid to render correctly. This is what has caused me to think this is a Grid issue rather than a ContentPane issue.
In looking at the HTML generated in Firebug, following elements are created: