Dynamic grid renders blank rows

I created a grid dynamically using the following code snippet:

var placeHolder = document.createElement("div");
dojo.byId("browse").appendChild(placeHolder);
var grid = new dojox.Grid({id: "grid", model: ddata, structure: layout2}, placeHolder);
grid.setModel(ddata);
grid.setStructure(layout);
grid.startup();

grid.model.store has 36 data items, so the data/model seem to be populated, but the grid renders blank rows with the table headings ok. The fields in the layout/view seem to be right. Any ideas? Thanks tons for the help.

Comments

try changing the auto-heigh

It's possible that your data IS being displayed, but is simply hidden.

I had to do this to get the grid to display:


var grid = new dojox.Grid({id: "grid", autoHeight: true, model: model, structure: structure}, placeHolder);

notice the 'autoheight: true'

Back to top