View Full Version : Does Grid.autoSize factor in paging toolbar for paged grid?
davida
27 Dec 2006, 1:24 PM
I'm using a grid with a paged datamodel and I have it autosizing whenever its containing ContentPanel is resized. But I notice that it always has a vertical scrollbar and the last row is not shown. This happens whether there are 3 rows or 30 rows - it always resizes to be about one row less than it needs and then adds the scrollbar.
I was just wondering if this is because the paging toolbar isn't factored into the resize logic since it seems the region that is scrolled out of view is curiously about the same height as the toolbar.
Thanks.
tryanDLS
27 Dec 2006, 2:37 PM
I think if you use a GridPanel, that resizing should be handled. If you're using a ContentPanel and just adding a grid and toolbar, you may have to do some additional calcs to adjust your size to do what GridPanel does automagically.
davida
27 Dec 2006, 6:53 PM
I'm not adding a toolbar myself. I'm getting the one that's automagically added when using paging with a data model.
Its rather complicated for me to use a GridPanel as I'm using a hierarchy of templates and the layout and panels are defined in the "base" template while the grid is used only in some pages in the "derived" template. So the layout and panels exist before I create my grid but a GridPanel takes a grid in its ctor.
But I don't think that's the problem anyway since I looked at the GridPanel and I'm essentially doing the same thing: overriding setSize and calling grid.autoSize() in it.
jack.slocum
28 Dec 2006, 3:47 AM
Are you also updating the container size? Do you have monitorWindowResize off?
davida
28 Dec 2006, 9:47 AM
I'm now trying to find a way to use GridPanel since that seems like the right approach, but its bringing up some code organization problems (long story).
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.