PDA

View Full Version : FooterPanel on Grid is invisible but showsup when render() is called



rogrdat
16 Aug 2007, 7:25 PM
I am seeing strange behavior using the Paging Toolbar on the Grid. The toolbar seems to be getting created properly without errors however the footer panel on the grid doesn't show. For some random reason, I added a call to "render()" and suddenly the footer panel shows up but with an error saying that the function "render()" isn't defined. Seems to be very strange behavior. Has anyone seen this ??



grid = new Ext.grid.Grid('searchGrid', {ds: this.getDataSource(),
cm: getColModel(),
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
enableColLock:false,
autoSizeColumns:false,
loadMask: true,
autoScroll:false,
viewConfig : {
forceFit:false,
scrollOffset:2
}
});
// Render the Grid
grid.render();

// Paging
var ftr = grid.getView().getFooterPanel(true);
var pt = new Ext.PagingToolbar(ftr, ds, {
pageSize: 25,
displayInfo: true,
displayMsg: 'Results {0} - {1} of {2}',
emptyMsg: "No results to display"
});

render(); // Causes an error but footer panel suddenly shows up ??
ds.load({params:{start:0, limit:25}});

jared
15 Jan 2008, 10:55 AM
I've got a similar problem. Why is it that I always run across the problems that no one has posted a response too? Perhaps because they're so esoteric and intermittent? Sometimes my footerpanel renders; othertimes it doesn't. Happens in both IE7 and FireFox2. It's like some odd race condition.