如何设置Wijgrid的宽度

How to set the width of a Wijgrid?

本文关键字:Wijgrid 设置 何设置      更新时间:2023-09-26

构建wijgrid:的代码

// Construct the grid
    $("#wijgridObject").wijgrid({
        allowPaging: true,
        allowSorting: true,       
        pageSize: gridTotalRows,
        pagerSettings: { position: "bottom" },
        allowColMoving: false,
        columnResizing: false,
        allowColSizing: false,
        data: currentLayer.GridObjects,
        showFilter: true,
        rowStyleFormatter: function (args) 
        {
            ...
        },
        columns: gridColumnGroupings
    });

如何设置Wijmo网格的宽度?我的似乎不是用浏览器窗口的宽度自动填充的。。。。

wijmo的人没有我们,没有其他关于将wijgrid的宽度设置为100%的主题

获取父元素的尺寸

var width=$("#parentElement").get(0).offsetWidth;var height=$("#parentElement").get(0).offsetHeight;

$("table").wijgrid("setSize",宽度,高度);

如果要自动设置任何尺寸,请使用"auto"表示宽度或高度。

$("#wijgridObject").wijgrid("option", "pageSize", calculateGridHeight());

$("#wijgridObject").wijgrid("option", "pageSize", 256);