开发者

Dojo Datagrid throws "Cell is undefined"

开发者 https://www.devze.com 2023-01-04 01:09 出处:网络
cell = document.createElement(\"td\"); cell.setAttribute(\"colspan\", \"1\"); cell.setAttribute(\"valign\", \"top\");
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" (9开发者_Go百科43 out of range 516)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消