Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
6
rated 0 times [  11] [ 5]  / answers: 1 / hits: 38595  / 15 Years ago, thu, january 28, 2010, 12:00:00

I have a tree grid with many columns, all with specified width. And boy, it looks terrible since headers are out of sync with columns below, even if I have short data in them.



Specifically, if the column heading title is shorter than this column width, the header shrinks down to the the size of the text in the header.



How can I make the header be exactly the same size as the column?



Question 2: I've noticed that although the documentation says that the columns width option is in pixels, I can see that it's actually not in pixels, but just a number relative to other widths in grid. E.g. if all fields are size 10, they all will be equal in size, but not 10 pixels in width.



Thanks in advance for clarifications, as this simple issue seems to have deeper roots than I thought.


More From » jquery

 Answers
42

Try to play with 'autowidth' and 'shrinkToFit' jqGrid parameters. For example, if 'shrinkToFit' is true, columns' width will be changed as if initial widths defines percentage. Read more here.


[#97727] Monday, January 25, 2010, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
dominiqued

Total Points: 189
Total Questions: 122
Total Answers: 103

Location: Ghana
Member since Sun, Mar 27, 2022
2 Years ago
;