How to restrict max height of jqGrid edit and view windows

前端 未结 1 1955
梦谈多话
梦谈多话 2020-12-22 10:42

jqGrid contains textareas with lot of lines. Edit and view window height is too big in this case . Those windows are rendered out of screen, bottom rows are not visible.

相关标签:
1条回答
  • 2020-12-22 11:37

    It seems to me that setting of "max-height" on the form should solve the problem:

    beforeShowForm: function ($form) {
        $form.css({"max-height": 0.70*screen.height+"px"});
    }
    

    See the demo. Because I don't have so many columns of the type 'textarea' I just set the height of one column to large value to verify the max-height of form, which you need. In the way I can't test the height of small edit form, but the height of view form independent on the setting.

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