I have the same kind of problem. I tried a solution similar to Ryan Corradini's.
It is only OK for first display. If I change the window size, the resize function is correctly called, but the grid's size stays unchanged.
Please note my particular conditions: in the resize function, I have to set the height attribute of the grid (resize+update only seems not enough).
HTML looks like :
<div id="msgItems" dojoType="dijit.layout.ContentPane" region="center"
style="padding:2px;">
<form id="msgDefForm" name="msgDefForm" dojoType="dijit.form.Form">
<div style="display:none;"><input type="text" name="msgName" id="msgName" dojoType="dijit.form.TextBox"></input>
</div>
<table dojoType="dojox.grid.DataGrid" jsId="msgGrid" id="msgGrid"
rowsPerPage="10" rowSelector="5px" singleClickEdit="false" loadingMessage="Loading message content"
errorMessage="Error while loading the message content" selectable="true" >
<thead>
<tr>
<th field="zone" width="8em" cellType="dojox.grid.cells.Select" options="properties, values" editable="true">Zone</th>
<th field="property" width="auto" editable="true">Property</th>
<th field="value" width="auto" editable="true">Value</th>
</tr>
</thead>
</table>
</form>
</div>
JS looks like :
... in startOnLoad :
dojo.connect( window, "onresize", msgGridResized);
msgGridResized ();
...
function msgGridResized () {
var cont = dojo.byId("msgItems")
var h = cont.clientHeight - 4;
if (h >= 0){
var grd = dijit.byId("msgGrid");
grd.attr("height", h+"px" );
grd.resize();
grd.update();
}
}