Search code examples
javascriptwijmowijgrid

How to set the width of a Wijgrid?


Code to construct the 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
    });

How can i set the width of the Wijmo grid? Mine seems to not be auto filling with the width of the browser window....

The wijmo people are usless and there are no other topics about setting the width of a wijgrid to be like 100%


Solution

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

    or

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