how to add scrollbars to jqgrid view window and restrict its height

后端 未结 1 1779
旧时难觅i
旧时难觅i 2021-01-06 13:47

If table contains big multi-line text column, pressing jqgrid view toolbar button creates view window with big height and without scrollbar. Most of data is outside screen a

相关标签:
1条回答
  • 2021-01-06 14:38

    I suggest to get the demo from the answer and extend the code a little. In the method beforeShowForm I suggest to include additional line

    $(this).children("span").css({
        overflow: "auto",
        "text-align": "inherit", // overwrite 'text-align: "right"' if exist
        display: "inline-block",
        "max-height": "100px"
    });
    

    You can see the results on the demo. The height of the View form will be variable, but the maximal height of every field will be restricted to 100px (see max-height above):

    enter image description here

    or

    enter image description here

    0 讨论(0)
提交回复
热议问题