简体   繁体   中英

jqgrid: Multi-line headings

I have a jqgrid table with must contain some lengthy strings in the header cells. What is the proper way to format them?

Just using the standard long string does not work since it will be cut at the right border of the cell if the cell width is too small.

Using a BR tag inside the text also does not work since the text after the BR tag is not being displayed (even after changing the height of the cell header through CSS).

Any proper way to accomplish this?

I would recommend you to use headertitles: true option to display tooltips with the full header text.

Moreover depend on your requirements you can consider to use wrapping of the column headers described in details here . One more alternative is to rotate column headers. I personally frequently use the way in case of having column with short contain the cells (like checkboxs) and long text in the column headers (see here ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM