Opened 12 years ago

Closed 11 years ago

#12091 closed defect (fixed)

appending grid to center aligned div crashes grid

Reported by: rmasse Owned by: Bryan Forbes
Priority: high Milestone: 1.6
Component: DojoX Grid Version: 1.5
Keywords: Cc: [email protected]
Blocked By: Blocking:


I've run into this problem a handful of times with 1.5

The second you try to add a DataGrid? to any center aligned container, it bombs and renders a blank screen. The second you remove the alignment, it works fine.

Sample code can be found below:

<html> <head> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" /> <link rel="stylesheet" type="text/css" href="" />

<script type="text/javascript" src="" djConfig="parseOnLoad: true"></script>

<style type="text/css">

.dojoxGrid table { margin: 0; } html, body { width: 100%; height: 100%; margin: 0; } .claro .dojoxGridCell { font-size: 10pt; }

body {

background-color: #d5ebf6;


</style> </head>

<body class="claro"> <br/> <div align="center">

<div id="reportContainer" style="width:600px;height:400px;"></div>

</div> </body> <script type="text/javascript">

dojo.require(""); dojo.require("dojox.grid.DataGrid?");

dojo.addOnLoad(function() { var store=new{

url: "/session.php?mode=getMembers&type=json"


var layout = [{

field: 'first_name', name: 'First Name', width: '30%'


field: 'last_name', name: 'Last Name', width: '30%'


field: 'member_type_id', name: 'ID', width: '25%'


field: 'id', name: 'Options', width: '15%'


var grid=new dojox.grid.DataGrid?({

query: { id: '*' }, id: "gridMembers", store: store, clientSort: true, noDataMessage: "<span class='dojoxGridError'>There are no members!</span>", structure: layout

}, document.createElement('div')); dojo.byId("reportContainer").appendChild(grid.domNode); grid.startup(); console.log(grid); });

</script> </html>

Change History (3)

comment:1 Changed 12 years ago by rmasse

Thought it would be usefull to add that despite the fact that the grid renders a blank screen when aligned center, when you inspect the element all looks as it should with the data present.

comment:2 Changed 12 years ago by bill

Owner: changed from bryanforbes to Bryan Forbes

comment:3 Changed 11 years ago by evan

Cc: [email protected] added
Milestone: tbd1.6
Resolution: fixed
Status: newclosed

(In [23783]) Fixes #12091, thanks for the fix patch from Gino Andres Caverzan(IBM, CCLA), the fix works well both for LTR/RTL cases.!strict

Note: See TracTickets for help on using tickets.