PDA

View Full Version : grid headers appear above dialog



ericwaldheim
9 Oct 2006, 7:03 PM
When I show or drag a dialog over a grid, the headers appear in front of the dialog. (The grid body is fine, behind the dialog).
I doubt I'm the first one to put a dialog over a grid so I assume I'm doing something wrong.
Here's my code.
Thanks for any insight.
Eric



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<HTML>
<head>

<link rel='stylesheet' type='text/css' href='yui/build/container/assets/container.css' />
<link type='text/css' rel='stylesheet' href='yui-ext/resources/css/grid.css'>


<script src='yui/build/yahoo/yahoo-min.js'></script>
<script src='yui/build/dom/dom-min.js'></script>
<script src='yui/build/event/event-min.js' ></script>
<script src='yui/build/dragdrop/dragdrop-min.js' ></script>
<script src='yui/build/connection/connection-min.js'></script>
<script src='yui/build/container/container-min.js'></script>

<script src='yui-ext/yui-ext-core.js'></script>
<script src='yui-ext/yui-ext.js'></script>
<script src='yui-ext/splitbar-lib.js'></script>
<script src='yui-ext/basic-grid-lib.js'></script>

<script type='text/javascript'>

YAHOO.util.Event.on(window, 'load', winmain);
function winmain()
{
var g = YAHOO.ext.grid;
var cols = [{header:"Name", width:300}];
var grid = new g.Grid('grid',
new g.DefaultDataModel([['some data']]),
new g.DefaultColumnModel(cols)
);
grid.render();

var dlg = new YAHOO.widget.Dialog("dlg",
{ modal:true, visible:false, width:"350px",
fixedcenter:true, constraintoviewport:true,
draggable:true });
dlg.cfg.queueProperty("buttons", [{text:"OK"}]);
dlg.render();
dlg.show();
}

</script>
</head>
<body>

<DIV id="dlg">
<div class="hd">YAHOO.widget.Dialog</div>
<div class="bd">
<form name="dlgForm">
Name:<input type="textbox" size="40" name="name"></input>
</form>
</div>
</DIV>

<div id="grid" style="left:100px;top:100px;border:1px groove grey;width:300px;height:300px"></div>

</body>
</html>

ericwaldheim
9 Oct 2006, 7:35 PM
nevermind, found it, zindex.
thanks.

abb_bbc_ccd
8 Jan 2009, 11:43 PM
I'm running into the same problem as you. Any help would be greatly appreciated. Thanks.