如何实现wordwrap在jqGrid工作在IE7,IE8和FF [英] How to implement wordwrap on jqGrid which works on IE7, IE8 and FF

查看:69
本文介绍了如何实现wordwrap在jqGrid工作在IE7,IE8和FF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在jqGrid上实现wordwrap,它在IE7,IE8和FF上工作,同时还具有列大小调整工作(网格对齐正确)。

How to implement wordwrap on jqGrid which works on IE7, IE8 and FF, while also having column-resize work (grid aligns correctly).

尝试内包内容在每个td具有特定宽度的div(基于初始TH宽度),但是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;
}

这篇关于如何实现wordwrap在jqGrid工作在IE7,IE8和FF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆