Opened 12 years ago

Last modified 11 years ago

#5589 closed defect

Bug in Grid 1.0 within ContentPane — at Version 5

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

Description (last modified by Nathan Toone)

Sorry for a lengthy post but I tried to creatу a reproducible test case.

Consider the following script (test1.html):

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>dojox.Grid Sizing Example</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../_grid/tundraGrid.css";
		
	</style>
	<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true"></script>
	<script type="text/javascript">
		dojo.require("dojox.grid.Grid");
		dojo.require("dojox.grid._data.model");
		dojo.require("dojo.parser");
	</script>
	<script type="text/javascript">
		data = [ 
			[ "Item1", 1 ],
			[ "Item2", 2 ]
		];
		model = new dojox.grid.data.table(null, data);
		
		var middleView = {
			cells: [[
				{name: 'Column 2', width: '75%'},
				{name: 'Column 3', width: '25%'}
		]]};
		var structure = [ middleView];
</script>
</head>
<body class="tundra">
<div id="grid" dojoType="dojox.Grid" model="model" structure="structure"></div>
</body>
</html>

When run it produces a grid with 2 rows as expected.

Now we modify it slightly by putting Grid into ContentPane? (test2.html).

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<title>dojox.Grid Sizing Example</title>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
	<style type="text/css">
		@import "../../../dojo/resources/dojo.css";
		@import "../_grid/tundraGrid.css";
		
	</style>
	<script type="text/javascript" src="../../../dojo/dojo.js" djConfig="isDebug:false, parseOnLoad: true"></script>
	<script type="text/javascript">
		dojo.require("dijit.layout.ContentPane");
		dojo.require("dojox.grid.Grid");
		dojo.require("dojox.grid._data.model");
		dojo.require("dojo.parser");
	</script>
	<script type="text/javascript">
		data = [ 
			[ "Item1", 1 ],
			[ "Item2", 2 ]
		];
		model = new dojox.grid.data.table(null, data);
		
		var middleView = {
			cells: [[
				{name: 'Column 2', width: '75%'},
				{name: 'Column 3', width: '25%'}
		]]};
		var structure = [ middleView];
</script>
</head>
<body class="tundra">
<div dojoType="dijit.layout.ContentPane">
<div id="grid" dojoType="dojox.Grid" model="model" structure="structure"></div>
</div>
</body>
</html>

This time no rows appear in the grid.

To my mind this is an outright bug. It not please advise about the rationale and a workaround.

Thanks!

Change History (5)

comment:1 Changed 12 years ago by bill

Component: GeneralDojoX Grid
Description: modified (diff)
Owner: changed from anonymous to sorvell

comment:2 Changed 12 years ago by dylan

Milestone: 1.2

comment:3 Changed 11 years ago by enzo

See also my comment to #5145 (use of a hidden parking area outside the Pane to perform render() and update() ).

comment:4 Changed 11 years ago by Bryan Forbes

Owner: changed from sorvell to Bryan Forbes

comment:5 Changed 11 years ago by Nathan Toone

Description: modified (diff)
Owner: changed from Bryan Forbes to Nathan Toone
Status: newassigned
Note: See TracTickets for help on using tickets.