Hi Abu
What is the best way to automatically set the individual widths of each column to "best fit" its contents.
My fields vary in width over time so I was looking for an option that would take the maximum length of a field's content and set it as the width.
Thanks
Hello,
There seems to be no best way to auto-resize the columns.
You will need some approximation and set width.
http://stackoverflow.com/questions/2299441/jqgrid-column-auto-width
Hello, my definitions of columns's width isn't working, even some titles doesn't, too, why?, by the way, i have many columns which isn't fit in the view grid, the horizontal scroll isn't show by default, , only show when adjust manually. thanks
You an also set fixed pixel width to each column:
// to set exact pixel width
$col["fixed"] = true;
$col["width"] = "20";
To show horizontal scroll, refer faq: How can I set the width in this grid (even with horizontal scrollbar), i do not want to set screen size width but custom width size.