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);
启动后会抛出错误“单元格未定义”(943超出范围516)
答案 0 :(得分:2)
总是仔细检查愚蠢的错误。 “布局”应该是“结构”。应该有一个更好的消息弹出,而不是单元格未定义。