Dojo Datagrid 抛出“单元格未定义”

发布于 2024-09-06 11:14:30 字数 552 浏览 3 评论 0原文

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)

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)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

国产ˉ祖宗 2024-09-13 11:14:30

总是仔细检查白痴的错误。 “布局”应该是“结构”。应该会弹出比单元格未定义更好的消息。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文