tags:

views:

88

answers:

2

I'm using jqGrid 3.6.5 and IE8

When setting shrinkToFit: false the columns are clearly not aligned with the column headers.
If I turn on shrinkToFit: true the problem disappears, but I lose the absolute sizing of the columns.
Resizing the columns (in code, or dynamically by the user) does not affect this problem.

See image for illustration

alt text

A: 

The alignment of the column headers are per default always 'center' and independ on the 'align' option from the ColModel (see http://www.trirand.com/jqgridwiki/doku.php?id=wiki:colmodel_options).

You can change the alignment of the column headers with the method which I describe3d in http://stackoverflow.com/questions/3003187/jquery-jqgrid-how-to-set-alignment-of-grid-header-cells/3006853#3006853.

I cann't reproduce the problem with shrinkToFit: false which you descrbed in your question. Which version of jqGrid you use? If you post a code example which reproduce the problem I could try to help you.

P.S. Probably the CSS which you use in your example could be also important. If you change table margins you should also change cellLayout parameter of jqGrid.

Oleg
Maybe my question wasn't defined clearly enough. My problem was the text in the columns starting "outside" the cell boundaries, as defined by the column header lines. See the red arrows in the image.I posted the solution I found as an answer
Ron Harlev
I had no time the problem. Could you post an example which reproduce the problem. As a data you can add any dummy data saved either as a JSON string or as a array of local data.
Oleg
A: 

As you can see from my original image (in the question), I have no borders between cell columns. I used border-right-color: none
This seems to be the reason. I changed it instead to border-right-color: White (to match the border with the background color), and the columns are now perfectly aligned with the column headers.

This might have been some issue with IE specifically, since it worked correctly on Chrome even before the change.

Ron Harlev