I need to setup a dhtmlxLayout with a toolbar and a grid in it, the width of the toolbar can fill the whole width of the layout, but the grid attached to the layout always has a blank space for the width and height. Could anybody help me with this?
Here is a demo to show a grid in layout and it’s not filling 100% for the width and height:
<?php
$dhtml_path = "./dhtmlxSuite_v44_std/";
?>
If you are initializing a grid through attachGrid, it must take all space in the parent container.
Check snippet.dhtmlx.com/192ec8e2a
Your code looks fine, just remove the enableAutoHeight command, it is not necessary in a case of attachGrid API.
Thanks, Stanlslav!
Maybe it’s the version (I’m using 4.4) or the skin I’m using for the layout (skyblue), I’m getting the grid like the first grid shows. If I attach the grid to the div directly, I will get the full width and height.
By the way, I tried your demo and it looks just as what I wanted, but I can not get it. Which version of dhtmlx is that?
I found where the problem is. It’s because I didn’t specify the right file path for the css file of the right skin. When I changed the skin css from this:
to this:
It looks right now. But it’s weird that when I use the web skin and set skin as dhx_skyblue, I still get sky blue skin. If it’s not the width thing, I wouldn’t notice I used the css file for web skin.
I still get sky blue skin.
Most probably you are loading codebase/dhtmlx.css file on the page ( which is default skin file, for your version of DHTMXL it will be skyblue skin ). If you want to use a skin, you need to include the skin css file instead of default dhtmlx.css