Opened 12 years ago
Closed 12 years ago
#8184 closed defect (invalid)
DataGrid 1.2: grid does not resize when browser resize
Reported by: | yherve | Owned by: | anonymous |
---|---|---|---|
Priority: | high | Milestone: | tbd |
Component: | DojoX Grid | Version: | 1.2.1 |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description
Hello Dojo Team,
I have a simple datagrid 1.2.
- when it is created statically, it works fine (see attachement static1.html)
- when it is created dynamically, the grid does not resize when the browser is resized (see attachement dynamic1.html)
= other problem: to attach the grid dynamically, I have used the following: dijit.byId("tableHere").containerNode.appendChild(tbl.domNode);
the first thing I tried was:
function createTable(){
tbl = new dojox.grid.DataGrid?(
{
id:"grid", store:test_store, structure:"mylayout",
}, dijit.byId("tableHere").containerNode
);
and the display was messed up. Is this a bug or a feature ? IMO, it should even be simpler than that. You should be allowed to supply directly the widgetid as second parameter and the library should deal with whatever you supply (a dom node or a widget)
Attachments (2)
Change History (4)
Changed 12 years ago by
Attachment: | static1.html added |
---|
Changed 12 years ago by
Attachment: | dynamic1.html added |
---|
comment:1 Changed 12 years ago by
comment:2 Changed 12 years ago by
Component: | General → DojoX Grid |
---|---|
Resolution: | → invalid |
Status: | new → closed |
Right, that's how you need to do it.
I have found the problem: the grid should be attached with dijit.byId("tableHere").attr("content", tbl.domNode);
or the function _checkIfSingleChild is not called
my guess is that an attempt to call this function should be made upon the first resize so that attaching the widget the way I did in the example does not cause trouble.