Liquid column width...

811 views
Skip to first unread message

Deep Ganatra

unread,
Nov 17, 2008, 5:33:30 AM11/17/08
to Flexigrid for jQuery
Hi guys,

I was curious to know if there is any ways to set the column width in
%. I tried width:'20%' but it didn't work. (It works with whole table
width)

Any workarounds?

Regards,
Deep

Deep Ganatra

unread,
Nov 17, 2008, 6:10:20 AM11/17/08
to Flexigrid for jQuery
Also, I just noticed that setting table width to 100% makes the table
disappear in IE7.

Vadivel Kumar

unread,
Nov 17, 2008, 9:08:08 AM11/17/08
to flex...@googlegroups.com
Looks like it is hard-coded, you have to set it in pixel only,

if (p.width != 'auto') g.gDiv.style.width = p.width + 'px';

If you want you can modify this line to work as per your requirement.

Thanks, Vadi (http://vadivelk.net)

 

Sych

unread,
Nov 18, 2008, 5:00:32 AM11/18/08
to Flexigrid for jQuery
use jquery dimesion plugin for liquid grid

function GetColumnSize(percent){
screen_res = ($(document).width()-221)*0.85;
col = parseInt((percent*(screen_res/100)));
if (percent != 100){
return col-18;
}else{
return col;
}
}


#grid defenition
width : GetColumnSize(10),

Vadivel Kumar

unread,
Nov 18, 2008, 6:08:10 AM11/18/08
to flex...@googlegroups.com
Sych - What is that col-18 is for? Is that the scrollbars you're removing from the window. Little explanation would be great help. We can make a patch if it is a bullet-proof implementation
 
Thanks,

Deep Ganatra

unread,
Nov 18, 2008, 6:28:37 AM11/18/08
to flex...@googlegroups.com
I think what we can do is, pick code from the code of table's width... coz making table width as 100% works fine..  so may be same kind of logic can be applied to the code of columns too..
---------------------------------------------
Deep Ganatra

www.whoisdeep.com
www.twitter.com/DeepXP/

Vadivel Kumar

unread,
Nov 18, 2008, 6:48:36 AM11/18/08
to flex...@googlegroups.com
i can submit a patch in few days of time. I am not sure whether you can open a bug for this issue in issue tracker.

Deep Ganatra

unread,
Nov 18, 2008, 6:50:11 AM11/18/08
to flex...@googlegroups.com
I personally feel, it is indeed a bug actually but not sure if it will be acceptable by the author or not.. will be great if the author replies here.
Reply all
Reply to author
Forward
0 new messages