解决jQgrid 设置列宽度自动调整时, 出现滚动条问题.

cellWidth : function () {
        var $testDiv = $("<div class='ui-jqgrid' style='left:10000px'><table class='ui-jqgrid-btable' style='width:5px;'><tr class='jqgrow'><td style='width:5px;'></td></tr></table></div>"),
        testCell = $testDiv.appendTo("body")
            .find("td")
            .width();
        $testDiv.remove();
   // return testCell !== 5; //原来
return Math.abs(testCell) < 0.5; //修改后(最新版本解决了这个bug) },

 

posted @ 2018-04-02 11:24  探讨  阅读(3226)  评论(0编辑  收藏  举报