I want to put a grid on a webpage scaled to the size of the page. If the CSS for the div used to initialise the gid is defined as follows:
#scaled_grid
{
top: 20px;
left: 20px;
width: 70%;
height: 70%;
}
Then what happens is that the grid is initially created the correct size, but the div does not resize as the page is resized. It’s as if the dhtmlxgrid is messing with the style I set for its own container, which is irksome.
If I add !important specifiers to the size style like this:
#scaled_grid
{
top: 20px;
left: 20px;
width: 70% !important;
height: 70% !important;
}
Then the div now does resize correctly but the grid itself still does not. The grid resizes horizontally and so correctly matches the width of its container as the page is resized, but although it is created with the correct initial height it does not adjust its height to match the size of its container div at all as the container div changes size when the page is resized.
I’m initialising the grid itself like this:
grid = new dhtmlXGridObject("scaled_grid");
grid.setImagePath("dhtmlxgrid/imgs/");
grid.setHeader(header);
grid.setSkin("light");
grid.init();
Does anyone know how I can get this to work please?