resize the jqgrid width while browser resizing

馋奶兔 提交于 2019-12-10 17:23:43

问题


Hi i have a problem in my jqgrid when i am clicking the pane the grid size is not resizing .how to resize it ?.


回答1:


Not sure if this is what you mean, but this should keep your grid at 100% width:

$(window).bind('resize', function() {
    $("#jqgrid").setGridWidth($(window).width());
}).trigger('resize');



回答2:


The above answer was good, but this solves both problems. Resizing now and Resizing when the window or IFrame gets resized.

        // Size me now...
        $("#list1").setGridWidth($(window).width());

        // Size me later...
        $(window).bind('resize', function () {
            $("#list1").setGridWidth($(window).width());
        }).trigger('resize');

Happy coding!



来源:https://stackoverflow.com/questions/1311728/resize-the-jqgrid-width-while-browser-resizing

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!