开发者

jqGrid column not aligned with column headers

I'm using jqGrid 3.6.5 and IE开发者_如何转开发8

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 http://www.freeimagehosting.net/uploads/274ab94e4d.png


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 Jquery JQGrid - How to set alignment of grid header cells?.

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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜