YUI Grid resizing help


I am using a special nesting grid yui-gf which splits a grid into proportions of 25% to 75%.
I currently have a grid which is set up as yui-gf (1:3).
I have a button which resizes the grid to 100% on one of the panels.
I use a javascript function to handle this resizing by using a Dom.setStyle method and setting width of the displayed grid to 100%.
So far this works as intended.

The trouble I am having is when I try to revert back to the original proportions. The dom.setStyle expects that I set the proportions back and I do not like setting the proportions when they were previously defaulted to the yui-gf. At the moment I am using a setting
dom.setStyle("divName","width", "34.6%")
dom.setStyle("divName","width", "64.6%")
Hard coding these values means the grid does not resize very well when a slider bar is used in an adjacent grid.

Can anyone tell me if there is a better way to resize the grids from yui-gf to one full grid and back again without having to hardcode percentages in?
The YUI grid builder example is exactly what I am looking to do but I cannot find the source code for it.

Any help would be greatly appreciated,


1 Reply

Recent Posts

in General Discussion at YDN