[英]How do I make JQgrid td height fixed in case of vertically overflowing content?
I use the following code: 我使用以下代码:
loadComplete: function (data) {
$('.ui-jqgrid tr.jqgrow td').each(function () {
var htmlString = $(this).html();
htmlString = '<div class=\'divJqgridMaxHeight\'>' + htmlString+ '</div>';
$(this).html(htmlString);
});
This fixes the problem but only for read-only grids, for editable grids this causes issues. 这可以解决问题,但仅适用于只读网格,对于可编辑网格,这会导致问题。
maybe you can try to change the following css class in ui.jqgrid.css : 也许您可以尝试在ui.jqgrid.css中更改以下CSS类:
.ui-jqgrid tr.jqgrow td {
/*some css*/
max-height: 20px;
}
simply change height to max-height. 只需将高度更改为最大高度。
Hope this will help. 希望这会有所帮助。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.