Jqgrid 序号列宽度调整

    // 遍历jqgrid 使其序号列宽度为45
    function setwidth() {
        $("table[role='grid']").each(function () {//jqgrid 创建的表格都有role属性为grid
            $('.' + $(this).attr("class") + ' tr:first th:first').css("width", "45"); //使表头的序号列宽度为40
            $('.' + $(this).attr("class") + ' tr:first td:first').css("width", "45"); // 使表体的序号列宽度为40
        });
    }

 

posted @ 2018-04-28 11:12  你也很优秀  阅读(3523)  评论(0编辑  收藏  举报