PDA

View Full Version : Rendeing ext.grid.DDGrid upon YAHOO.util.Panel



christocracy
15 Oct 2006, 11:19 AM
Hello again, Mr. Jack. Have you ever seen this behaviour?
(drag panel over content...notice how grid header rows seem to extend invisibly and infinitely to the right, wreaking havoc with the content below)

http://griffon.resistorsoftware.com/lab/grid.html



init : function(){
// first render panel
var panel = new YAHOO.widget.Panel('panel', { effect:{...} );
panel.render();
panel.show();

var dm = new YAHOO.ext.grid.DefaultDataModel([
['yahoo.js', 1.38],
['dom.js', 11.2],
['event.js', 9.31],
['dragdrop.js', 21.2],
['connection.js', 7.85],
['yui-ext-core.js', 34.9],
['tabs-lib.js', 4.82],
['splitbar-lib.js', 6.79]
]);

var cm = new YAHOO.ext.grid.DefaultColumnModel([
{header: 'File', width: 125},
{header: 'Size', width: 72, renderer:renderKB}
]);

// render grid.
var grid = new YAHOO.ext.grid.DDGrid('ddgrid1', dm, cm);
grid.getDragDropText = getDDText;
grid.render();
}

jack.slocum
15 Oct 2006, 12:54 PM
That's sweet. My guess is it's FireFox choking on the transparent iframe behind the headers, even though it is wrapped in a container with overflow:hidden.

Add some css to this effect:



#yourgridid iframe{
display:none;
height:0px;
width:0px;
}


and see what happens. Then we'll know if we're barking up the wrong tree.

christocracy
15 Oct 2006, 1:17 PM
Bravo, once again, Mr. Jack.

do you think it's ok to add that rule to


.ygrid-hrow-frame{
height: 22px;
left: 0;
display:block;
position: absolute;
top: 0;
width: 10000px;
z-index:1;

display:none;
height:0px;
width:0px;

}

christocracy
15 Oct 2006, 1:37 PM
or should I be less specific, isolating the rule in the context of .panel



/***
* important fix from Mr. Jack wrt Grids rendered on Panels
* http://www.jackslocum.com/forum/viewtopic.php?p=1072#1072
*/
.panel .ygrid-mso iframe {
/*display:none;*/
height:0px;
width:0px;
border: 1px solid red;
}
/************************************************************/

jack.slocum
15 Oct 2006, 3:17 PM
I guess it depends, the iframe is only there for grids where you are rendering form elements. If you aren't going to have any grids with form elements, then you can disable it globally.