Ticket #5145 (closed defect: worksforme)

Opened 13 months ago

Last modified 3 months ago

Grid display issue

Reported by: guest Owned by: toonetown
Priority: normal Milestone: 1.2
Component: DojoX Grid Version: 1.0
Severity: normal Keywords:
Cc: info@…

Description (last modified by toonetown) (diff)

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

  Changed 12 months ago by bill

  • status changed from new to closed
  • resolution set to duplicate

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.

  Changed 12 months ago by guest

  • status changed from closed to reopened
  • resolution deleted

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.

  Changed 9 months ago by dylan

  • priority changed from high to normal
  • milestone set to 1.2

follow-up: ↓ 8   Changed 3 months 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.

  Changed 3 months ago by BryanForbes

  • owner changed from sorvell to BryanForbes

  Changed 3 months ago by toonetown

  • description modified (diff)

  Changed 3 months ago by toonetown

  • owner changed from BryanForbes to toonetown
  • status changed from reopened to new

in reply to: ↑ 4   Changed 3 months 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 :-( :-(

  Changed 3 months ago by toonetown

  • status changed from new to closed
  • resolution set to worksforme

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.