views:

23

answers:

1
cell = document.createElement("td");
cell.setAttribute("colspan", "1");
cell.setAttribute("valign", "top");
var grid = new dojox.grid.DataGrid({
    id: "gridID",
    store: new dojo.data.ItemFileWriteStore({data: {items: []}}),
    elasticView: "2",
    selectionMode: "single",
    autoWidth: "true",
    rowCount: "4",
    layout: [{field: "name", editable: "false", width:"160px", name:"fieldname"}],
    query: "{itemID:'*'}"
}).placeAt(cell);
grid.startup();
row.appendChild(cell); 

After it starts up it throws the error "cell is undefined" (943 out of range 516)

A: 

Always double check the idiot mistakes. "Layout" should be "structure". There should be a better message popping up than cell is undefined.

mmontalvo