当前位置: 代码迷 >> 综合 >> jqgrid--表头换行显示
  详细解决方案

jqgrid--表头换行显示

热度:91   发布时间:2024-03-09 00:42:42.0

1.添加自定义的css文件,css内容如下

th.ui-th-column div{white-space:normal !important;height:auto !important;padding:0px;
}

2.html文件中添加对css文件的link

    <!--  添加自定义的css,允许jqgrid表头换行  --><link rel="stylesheet" type="text/css" th:href="@{/js/test/custome.css}">

3.jqgri添加换行符

{label: 'Test<br/>Path', name: 'testPath', width:100, sortable: false},

4.设置shrinkToFit: false,