Forum


I have a jqGrid with just 2 columns.
The problem is that size of columns is not the same that I've set in their "Width" property.
E.g. I have specified
Column1 width = 150px, Column2 width: 80px
But when I load jqGrid, I see that sizes of respective column and data cells are slightly different.
Indeed, when I look up width values in FireBug I can see
Header1 width = 147.4px, Header2 width: 78.8px (!!!)
Column1 width = 148.33px, Column2 width: 77.667px (!!!)
So their sum is the same is above, but item values are slightly different.
If I add a couple more columns, this distortion becomes more visible with each next column.
I've made sure, that shrinkToFit option = false, so that only real pixel values will be used, not proportions.
But this behaviour persists both with shrinkToFit option = true, but disproportion between headers/data is slighly different.
So even with shrinkToFit set to false, where I am supposed to have total control over column/header width, "someone" changes my values. I've made sure that no external css is included, so no external incluences can be considered.
Also, columns names/values are short and fit nicely inside of columns, they don't "expand them".
What can be the problem? Is there any option I missed or misunderstand?
The grid options code is smth like this:
url: 'myurl.com',
datatype: 'json',
mtype: 'GET',
height: "auto",
treeGrid: true, treeGridModel : 'adjacency', ExpandColumn : 'TreeField',
loadonce: false,
prmNames: {sort: "sidx2″, order: "sord2″},
shrinkToFit: false,
viewrecords: true,
imgpath: 'themes/basic/images',
caption: 'MyGrid',
rowNum: -1
Playing with
//autowidth: true,
//forceFit: false,
didn't align headers with data either.
Also, would jqGrid allow if I set width values with direct jQuery calls?
12:11

Moderators
30/10/2007

Hello,
The whole width of the column is width + padding + border - did you have see these values in firebug?
Best Regards
Tony
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
67 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66