两行或更多行上的Jqgrid标头 [英] Jqgrid headers on two or more rows

查看:107
本文介绍了两行或更多行上的Jqgrid标头的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下问题: 我需要放置Jqgrid的两行或更多行标题内容. 我在替代方法下的 jqgrid双头上看到了Zac提供的示例,但是仅更改了css网格上没有任何变化. 是否可以有一个更完整的示例来重现该行为? 谢谢 安杰洛

I have the following problem: I need to put on two or more rows header content of a Jqgrid. I saw the example provided by Zac on jqgrid double headers under alternatives, but by changing only the css I get no change on the grid. Is it possible to have a more complete example in order to reproduce the behavior? Thanks Angelo

推荐答案

如果我了解您的要求,那么您希望具有多行列标题.您可以通过以下其他CSS来做到这一点

If I understand you correct you want have multi-line column headers. You can do this with following additional CSS

<style type="text/css" media="screen">
    th.ui-th-column div{
        white-space:normal !important;
        height:auto !important;
        padding:2px;
    }
</style>

在那之后,您将有像这样的列

After that you will have columns like here

在该示例中,文本欧元金额"被自动换行,并且在第一个标题的文本中,换行符是使用"Inv
否"明确进行的.

In the example the text 'Amount in EUR' was wrapped automatically and in the text from the first header the line break was made explicitly with 'Inv
No'.

答案中,您将请参阅演示的链接.

In the answer you will see the link to the demo.

已更新:在

UPDATED: In the answer you will find more recent code.

这篇关于两行或更多行上的Jqgrid标头的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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