How to implement wordwrap on jqGrid which works on IE7, IE8 and FF(如何在适用于 IE7、IE8 和 FF 的 jqGrid 上实现自动换行)
问题描述
如何在适用于 IE7、IE8 和 FF 的 jqGrid 上实现自动换行,同时还可以调整列大小(网格正确对齐).
How to implement wordwrap on jqGrid which works on IE7, IE8 and FF, while also having column-resize work (grid aligns correctly).
尝试使用特定宽度的 div(基于初始 TH 宽度)对每个 td 上的内容进行内包装,但 colresize 不适用于我插入的 div.jqGrid 会计算调整后的 TH 和相邻 TH 的宽度.
Tried to innerwrap content on each td with a div of specific width (based on initial TH width), but colresize will not work on the divs I've inserted. jqGrid calculates the widths of the resized TH and adjacent THs though.
有没有更好的解决方案可以避免所有 JavaScript 'hacks'?
Is there a better solution which will avoid all the JavaScript 'hacks'?
推荐答案
jqGrid Text/Word Wrapping 解释了如何做到这一点,使用以下 CSS:
jqGrid Text/Word Wrapping explains how to do this, using the following CSS:
.ui-jqgrid tr.jqgrow td {
white-space: normal !important;
height:auto;
vertical-align:text-top;
padding-top:2px;
}
这篇关于如何在适用于 IE7、IE8 和 FF 的 jqGrid 上实现自动换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:如何在适用于 IE7、IE8 和 FF 的 jqGrid 上实现自动换行


基础教程推荐
- jQuery File Upload - 如何识别所有文件何时上传 2022-01-01
- WatchKit 支持 html 吗?有没有像 UIWebview 这样的控制器? 2022-01-01
- 为什么我在 Vue.js 中得到 ERR_CONNECTION_TIMED_OUT? 2022-01-01
- 什么是不使用 jQuery 的经验技术原因? 2022-01-01
- Javascript 在多个元素上单击事件侦听器并获取目标 2022-01-01
- 如何使用 CSS 显示和隐藏 div? 2022-01-01
- 每次设置弹出窗口的焦点 2022-01-01
- Node.js 有没有好的索引/搜索引擎? 2022-01-01
- 如何使用sencha Touch2在单页中显示列表和其他标签 2022-01-01
- 如何在特定日期之前获取消息? 2022-01-01