PDA

View Full Version : Hiding the Paging Toolbar Within a Grid



aleg
11 Nov 2009, 8:52 AM
I'm trying to create a grid which conditionally hides the paging toolbar on a store load event if the result set size makes it unnecessary. However I'm running into grid layout issues once I call pagingtoolbar.hide(), which appears to just remove the paging toolbar controls, and leave an empty gray space in its place.

I'm debugging this from the FireBug console and can call the following methods to get the behavior I desire, however I need to call these one at a time.

pagingtoolbar.hide()
...
grid.doLayout()
...
grid.syncSize()

It seems these calls need to be made within event overrides from either the grid or the pagingtoolbar but I'm not sure where. Also, why can't I just call pagingtoolbar.hide() and have the event cascade into the grid?

I should mention the grid is contained within the center panel of a border layout.

Thanks,
Alex

aleg
13 Nov 2009, 7:24 PM
Maybe my question wasn't clear. Can anyone tell me how to hide the PagingToolbar of a Grid at runtime?

FxMan
14 Dec 2009, 1:34 AM
http://www.extjs.com/forum/showthread.php?t=13111&page=2