JQGrid中的列自动换行 [英] Column Wordwrap in JQGrid

查看:725
本文介绍了JQGrid中的列自动换行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都知道如何在JQGrid中包装列名.请在下面找到我的JSON代码

Anybody knows on how to wrap column names in JQGrid. Please find my JSON code below

colModel:[ {name:'RequestID',index:'CreditRequest.CreditRequestID',width:100,align:'left'},.....

colModel: [ { name: 'RequestID', index: 'CreditRequest.CreditRequestID', width:100, align: 'left' },.....

关于上面的代码,如果内容的大小超过我希望将其包装的话.任何想法或评论

With reference to the above code if the size of the content exceeds I want it to be wrapped. Any thoughts or comments

推荐答案

确保换行的最简单方法是在需要换行的列名称中放置<BR/>标记.例如,ClientPrimaryName可以写为Client<BR/>PrimaryName,因此它实际上呈现为:

Well the simplest way to ensure a line break is to put a <BR/> tag in the column name where ever you need a line break. For instance ClientPrimaryName can be written as Client<BR/>PrimaryName, so that it actually renders as:

客户端
主要名称

Client
PrimaryName

这篇关于JQGrid中的列自动换行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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