How to restrict maximum height of row in jqgrid

前端 未结 2 726
一整个雨季
一整个雨季 2020-12-05 16:36

Column contains long multiline texts which make row height too big.

I tried styles below based on Tony\'s answer in http://www.trirand.com/blog/?page_id=393/help/po

2条回答
  •  Happy的楠姐
    2020-12-05 17:00

    You can't use max-height on td or tr elements, but you can place the multiline text inside of the

    having the same style. To do this you can use for example the following custom formatter:

    formatter: function(v) {
        return '
    ' + v + '
    '; }

    or place the

    ...
    inside of your JSON/XML data. As the result you will have something like

    enter image description here

    (I displayed tooltip during I made the screenshot to show that the data in the cell contain more lines as displayed in the grid) See the corresponding demo here.

提交回复
热议问题