Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Mat Murdock on Jul 08, 2008 23:05
open dhtmlx forum
Split table auto resize

Is there a way to have a grid with frozen columns resize itself to fit the screen when the browser window is re sized?

Thanks,

Mat
Answer posted by Support on Jul 09, 2008 01:01
In dhtmlxgrid 1.6 behavior can be enabled by
    grid.enableAutoWidth(true)
    grid._setAutoResize();
Answer posted by Mat Murdock on Jul 09, 2008 09:09
This almost works.Please visit this webpage: http://#####.###########.net/test/test.php.  If you have your browser window size larger then the grid then no scroll bars are shown.  This is expected.  If you resize your browser window to a size smaller then the grid the scroll bars will not show up.  If you resize it again then the scroll bars will show.  Is there a work around for this.
Answer posted by Support on Jul 09, 2008 09:08
You can add next code to the grid initialization

dhtmlxEvent(window,"resize",function(){
        mygrid.setSizes();
})

It must resolve issue.
Answer posted by Mat Murdock on Jul 09, 2008 10:47
That works in Firefox but no in IE.

Mat
Answer posted by Support on Jul 10, 2008 09:52
Next code will work in both IE and FF

    dhtmlxEvent(window,"resize",function(){
            mygrid.setSizes();
            mygrid._fake._correctSplit();
    })
Answer posted by Mat Murdock on Jul 10, 2008 11:16
Great, that works.

Thanks,

Mat