我已经通过有关dojox.Grid职位这里,其中包括一个关于TabContainer的阅读,但它似乎并没有解决我的问题。如何把Dojox.grid在dijit.Dialog
我有我编程方式添加一个网格,如果网格是在“主”的标记,但停止显示,如果我把电网中一个对话框,工作的一种享受。
任何想法为什么?使用dojo 1.3.1。
dijit.byId("myDialog").show();
var gridStore = new dojo.data.ItemFileReadStore({
data : {
identifier : "id",
items : [
{"id" : 1, "label" : "foo"},
{"id" : 2, "label" : "bar"},
{"id" : 3, "label" : "baz"}
]
}
});
/* A simple layout that specifies column headers and
* mappings to fields in the store */
var gridLayout = [
{name : "ID", field : "id", width : "50%"},
{name : "Label", field : "label", width : "50%"}
];
/* Programmatically construct a data grid */
var grid = new dojox.grid.DataGrid({
store : gridStore,
structure : gridLayout
}, "gridNode");
/* Tell the grid to lay itself out since
* it was programmatically constructed */
grid.startup();
标记是:
<div dojoType="dijit.Dialog" id="myDialog" title="Multiple Addresses" style="width:400px;height:300px" >
<div dojoType="dijit.layout.ContentPane" id="gridNode" style="positon:relative;width:100%;height:100%"></div>
感谢您的帮助, Ruprict