Opened 12 years ago

Closed 11 years ago

#5145 closed defect (worksforme)

Grid display issue

Reported by: guest Owned by: Nathan Toone
Priority: high Milestone: 1.2
Component: DojoX Grid Version: 1.0
Keywords: Cc: info@…
Blocked By: Blocking:

Description (last modified by Nathan Toone)

When we place the Grid within a ContentPane? which is a child of a SplitContainer?, the text in the rows does not show up. Only the column headings show.

But if we place any text just above the Grid with the ContentPane?, the text in the rows starts showing up.

This means if Grid is the only child element of the ContentPane?, this issue is coming up.

Please check the below url for an example. If you were to remove the text abcd placed just above the grid, you will notice the issue. I have only tested this on IE6.

http://www.edeskonline.com/tests/dojo/grid.asp

Change History (9)

comment:1 Changed 12 years ago by bill

Resolution: duplicate
Status: newclosed

Dup of #4900 and of http://dojotoolkit.org/forum/dijit-dijit-0-9/dijit-development-discussion/grid-resize-within-splitcontainer#comment-8797. It's a bug but also, you should move the ItemFileReadStore? declaration outside of the SplitContainer?, and then get rid of the intermediate ContentPane? definition wrapping the Grid.

comment:2 Changed 12 years ago by guest

Resolution: duplicate
Status: closedreopened

The ticket #4900 and the forum url which you mentioned, both talk about resizing issue within the SplitContainer?. Whereas I am talking about the display of rows in the grid. Please look at http://www.edeskonline.com/tests/dojo/grid1.asp

You will notice that only column headings appear and no text in the rows. As soon as i place the grid within a ContentPane? and put some text above the grid, the text in the rows starts appearing.

P.S.: Your suggestion of moving the ItemFileReadStore? declaration outside the Splitcontainer solves the resizing issue mentioned in the ticket#4900 and the forum url.

comment:3 Changed 11 years ago by dylan

Milestone: 1.2
Priority: highnormal

comment:4 Changed 11 years ago by enzo

I've got a similar case (DataGrid? inside AccordionContentPane? displayed with zero height) and I have found a workaround that may also offer hints for fixing the bug. The trick is to move the DOM node elsewhere before invoking the methods render() and update(), where "elsewhere" may mean a hidden DIV outside the ContentPane?. So, typically the sequence will be:

one off:

dojo.byId("parkingArea").style.visibility = 'hidden';

Then, assuming that dataGrid is our instance of dojox.grid.DataGrid?:

dgnode = dataGrid.domNode; the DataGrid?'s DOM stuff dojo.byId("parkingArea").appendChild(dgnode); move it inside the parking area this.dataGrid.render(); or this.dataGrid.update(); dgnode.appendChild(dojo.byId("parkingArea").firstChild); put it back

Note that the parking area MUST NOT be styled "display: none", or else the grid will again be flattened; "visibility: hidden" works.

comment:5 Changed 11 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

comment:6 Changed 11 years ago by Nathan Toone

Description: modified (diff)

comment:7 Changed 11 years ago by Nathan Toone

Owner: changed from Bryan Forbes to Nathan Toone
Status: reopenednew

comment:8 in reply to:  4 Changed 11 years ago by enzo

Replying to enzo:

I've got a similar case (DataGrid? inside AccordionContentPane? displayed with zero height) and I have found a workaround that may also offer hints for fixing the bug. The trick is to move the DOM node elsewhere before invoking the methods render() and update(), where "elsewhere" may mean a hidden DIV outside the ContentPane?. So, typically the sequence will be:

one off:

dojo.byId("parkingArea").style.visibility = 'hidden';

Then, assuming that dataGrid is our instance of dojox.grid.DataGrid?:

dgnode = dataGrid.domNode; the DataGrid?'s DOM stuff dojo.byId("parkingArea").appendChild(dgnode); move it inside the parking area this.dataGrid.render(); or this.dataGrid.update(); dgnode.appendChild(dojo.byId("parkingArea").firstChild); put it back

Note that the parking area MUST NOT be styled "display: none", or else the grid will again be flattened; "visibility: hidden" works.

Groan: this workaround, tested with the nightly build of 19 Jul 2008, no longer appears to work with a more recent (12 Aug 2008) nightly build :-( :-(

comment:9 Changed 11 years ago by Nathan Toone

Resolution: worksforme
Status: newclosed

The original issue described here does not occur with dojox.grid.DataGrid?. Please open a separate ticket with a test case for the accordionpane issue.

Note: See TracTickets for help on using tickets.