fitToContainer

makes grid to fit the size of a container

boolean fitToContainer;

Deprecated

instead of it, use the autoWidth property:

var treegrid = new dhx.TreeGrid("treegrid_container", {
    columns: [// columns config],
    autoWidth:true,     data: dataset
});

Example

<div id="grid_container" style="width:600px;height:400px;"></div>
 
 
var grid = new dhx.Grid("grid_container", {
    columns: [// columns config],
    // grid will be adjusted to the size of container
    fitToContainer:true,     data: dataset
});


Default value:

false
Details

Please note that if a grid has its own sizes specified, their values will redefine the size of the container.

See also
Back to top