Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#5343 closed defect (invalid)

problem w/ two Grids on same page

Reported by: guest Owned by: benschell
Priority: high Milestone:
Component: DojoX Grid Version: 1.0
Keywords: Cc: hmarc@…
Blocked By: Blocking:

Description

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 dojox.grid.data.Table(null, data);

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

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

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

Change History (6)

comment:1 Changed 12 years ago by Douglas Hays

Component: GeneralDojoX Grid
Milestone: 1.0.2
Owner: changed from anonymous to sorvell
severity: normalblocker

Please evaluate this for 1.0.x since this is from a 1.0.x deployment.

comment:2 Changed 12 years ago by guest

The problem is not interaction between widgets. I initially thought this because when I isolated the instance of Grid that was not working alongside another instance, it began working. I now realized that the problem was one of its container node. I was placing the Grid that didn't work directly inside a <td> tag. When I wrap it with a <div>, it works. This still seems strange to me, but I wanted to give you more precise information as to what the problem is. It seems that the resizeWidth and resizeHeight operations in VirtualGrid? and in GridView? may need to be addressed.

comment:3 Changed 12 years ago by Adam Peller

Milestone: 1.0.21.0.3

comment:4 Changed 12 years ago by benschell

Owner: changed from sorvell to benschell

I'm taking a stab at a whole bunch of Grid bugs. Re-assigning.

comment:5 Changed 12 years ago by benschell

Resolution: invalid
Status: newclosed

This is primarily a sizing issue. I've opened a new bug (#5761) to establish this more clearly. If the parent element of the Grid container does not have an explicit size, the main area of the Grid is reduced to 0px tall. The header, however, still has a height due to it's content.

#5761 has a patch to make sure the header is hidden if the Grid has been sized to a zero height. However, to fix the above mentioned problem (and to display the Grid correctly), the height of the parent container (whether it is a TD or a DIV) must be set explicitly.

comment:6 Changed 12 years ago by (none)

Milestone: 1.0.3

Milestone 1.0.3 deleted

Note: See TracTickets for help on using tickets.