I didn't really design flexigrid to use % sizes as the dragndrop and resizing functions are dependent on accurate per pixel measurements.
Paulo[/quote]
Thanks for the reply Paulo
its more of an visual appeal factor - i use 100% width grid for my project and having columns in px will leave a blank space in the grid on a larger screen (which doesn't look to nice)
from what i can remember open rico grid does some funky % -> px calculation based on grid size to handle resize etc and columns based on %
question: is there an easy way to find the px width of a flexigrid? - if so then i can look at writing a % -> px type conversion type
If anyone else has any suggestions i would appreciate hearing them
Cheers
Justin[/quote]
Hello Justin,
This is actually very simple:
With jquery COOKIE plugin, I retrieve the screen resolution width and store it in a cookie:
Then with PHP all you have to do is get that cookie and calculate the column size based on the percentage.
Code:
function calculate_column_size($column_size)
{
$screen_res = get_cookie('scrres'); //This is a codeigniter function from the "cookie" helper
if ($screen_res != FALSE)
$usable_screen = ($screen_res);
else
$usable_screen = (1024); //Default resolution
return ($column_size*($usable_screen/100)); //Calculate in pixels and return
}
You also can probably do this with javascript only.
Hope it helps!