Opened 15 years ago

Closed 15 years ago

#5342 closed defect (duplicate)

problem w/ two Grids on same page

Reported by: guest Owned by: anonymous
Priority: high Milestone:
Component: General Version: 1.0
Keywords: Cc:
Blocked By: Blocking:


I have two widgets on a page, each of which includes a dojox.Grid. The first one to render shows data, and the second shows only the column headers. I then load the second widget on its own page, with the same data set, and the data is displayed.

Here are some excerpts from the code that instantiates the widget:

var view1 = {

cells: [


{name: 'Picture'}, {name: 'Title'}, {name: 'Price'}, {name: 'Category'}, {name: 'Author'}, {name: 'Date Posted'}




var layout = [ view1 ]; ..... for (var i=0;i<numEntries;i++){

entry = feed.entries[i]; data.push(this.getRowFromEntry(entry));


this.model = new, data);

.... var w = new dojox.Grid({

"id": "allItemsTableWidget", "model": this.model, "structure": layout

}); this.tableDiv.appendChild(w.domNode); w.render();

Change History (2)

comment:1 Changed 15 years ago by guest

frankf: Hard to tell from the description, but if the first and second grid.domNodes are being appended to the same html node, you will see a similar problem. In general, a grid will consume the space of its parent node. The way around this is to place two html nodes in tableDiv, append one grid.domNode to the first node and the second grid.domNode to the second node, each node or grid having its size defined.

comment:2 Changed 15 years ago by tk

Resolution: duplicate
Status: newclosed

duplicate of #5343 (it has more replies so closing this one)

Note: See TracTickets for help on using tickets.