Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Dan on Feb 18, 2009 21:26
open dhtmlx forum
Column resize of Grid in Tabbar that is attached to Layout

When the window size is changed, the grid is not resizing. The grid width is set to percent.

When the window is returned to a full screen size, the grid columns remain compressed. If I click on a grid cell separator, the grid will automatically re-size properly and expand to full width of tabbar content area.

I have created an event listener for a window resize event, which works and makes the call to the setSizes() method, however the grid does not resize.

Any suggestions?
Answer posted by Support on Feb 19, 2009 01:49
How do you init grid inside tabbar? If you have used attachGrid method - the grid must correctly resize after parent element resized, but if you have it attached through HTML container - it will not react on resize of parent element. 

>>and makes the call to the setSizes() method
try to change it as
window.setTimeout(function(){
      mygrid.setSizes()
},1);
so it will be called only after all other elements react on resize. 
Answer posted by Dan on Feb 19, 2009 09:19
I had looked for an attachGrid() method on tabbar and could not find; that would be preferable solution.    I found the dhtmlxtabbar_wins.js include file (need to look in the whole package of components - wasn't in the professional 2.0 package), and now works properly using the attachGrid() method. 

Thanks
Dan