If I maximise a window containing a grid with option enableAutoHeight set to true, the grid will redraw (cool) but the header of the grid move when I move the scrollbar (not cool)
If I maximise a window containing a grid with option enableAutoHeight set to false, the grid will not redraw (not cool) but the header of the grid doesn’t move when I move the scrollbar (cool)
Is there a way to be cool twice in same time ?
Thanks
Is there a way to be cool twice in same time ?
yes, it is possible
Please check attached sample - it shows two possible ways ( one for documents with doctype, second for documents without doctype) to implement auto-size behavior
The main idea - to have one more div around grid, with width as 100% and force grid to reflect its sizes, in mode without doctypes it requres only set height as 100%, in doctyped mode call of enableAutoHeight required.
grid_100_procents.zip (3.12 KB)
Hellowww
It’s works great with normal windows, but not with dthmlxwindows.
If I maximise a dhtmlxwindows attached to your sample, I’ve 2 vertical scrollbars.
Is there a way to fix this ?
The next code may resolve problem
winPr.window(id).attachEvent(“onresize”,function(){
mygrid.setSizes();
});
as result, each time when window resized, grid will update its sizes as well.
We plan to add native integration for grid and window, but it will be included only in next version of dhtmlxwindow.
Yes it works with the following code :
win.attachEvent(‘onMaximize’, function resize(){mygrid.setSizes()});
win.attachEvent(‘onMinimize’, function resize(){mygrid.setSizes()});
Thanks a lot
PS : setSizes() is not in the documentation (API functions)