PDA

View Full Version : Grid autoSizeColumns horizontal scrollbar



Rasmus
26 Sep 2006, 8:13 AM
When autoSizeColumns is true and the grid has enough rows to get a vertical scrollbar, then the horizontal scrollbar always appears to scroll the grid the width of the vertical scrollbar horizontally (if that made any sense). It would be nice if there was a way to compensate for that to always avoid getting a horizontal scrollbar in autosize mode.

jack.slocum
26 Sep 2006, 2:43 PM
It should take into account the scrollbar. Can you post some code?

Primarily I am looking for remote loading. Inline loading *should* take into account the scrollbar, if it doesn't then it is a bug.

A workaround you might try also (this is useful for remote loading as well) is instead of setting autoSizeColumns to true, after your grid loads call grid.getView().autoSizeColumns();

Jack

Rasmus
26 Sep 2006, 7:04 PM
A workaround you might try also (this is useful for remote loading as well) is instead of setting autoSizeColumns to true, after your grid loads call grid.getView().autoSizeColumns();


Yup, that fixes it. I am using the JSON remote loader and already have some stuff running on the load event, so it is simple enough to add it there.

mschering
14 Jun 2007, 5:06 AM
Note that this works only in the datastore load event.

Not just by adding it after grid.render().

Thanks for the help though!