Opened 13 years ago

Closed 13 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:


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)

static1.html (3.3 KB) - added by yherve 13 years ago.
dynamic1.html (3.4 KB) - added by yherve 13 years ago.

Download all attachments as: .zip

Change History (4)

Changed 13 years ago by yherve

Attachment: static1.html added

Changed 13 years ago by yherve

Attachment: dynamic1.html added

comment:1 Changed 13 years ago by yherve

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.

comment:2 Changed 13 years ago by bill

Component: GeneralDojoX Grid
Resolution: invalid
Status: newclosed

Right, that's how you need to do it.

Note: See TracTickets for help on using tickets.