PDA

View Full Version : grid.getBottomToolbar().onClick is not a function???



elbino
5 Oct 2010, 6:02 AM
Hallo there,

I had to migrate a web application from extjs 2.x to 3.1.1. I fixed most of the bugs that came up as a result of the migration. But not there seems to be one left that says:

"grid.getBottomToolbar().onClick is not a function"

grid is an Ext.grid.EditorGridPanel.

Firebug brings up an error when clicking a button. The button handler does:


handler: function(btn, e){
grid.getBottomToolbar().onClick("last");
addTableRow(store);
grid.getSelectionModel().select(store.getCount() - 1,0);

This worked with extjs 2.x. Any idea what's wrong?

Thanks and greetings,
Thomas

Condor
5 Oct 2010, 6:16 AM
PagingToolbar changed from Ext 2.x to 3.x.

Use:

grid.getBottomToolbar().moveLast();

ps. Why are you migrating to Ext 3.1.1? Why not to Ext 3.2.1, 3.3 RC1 or at least Ext 3.1.2?

elbino
5 Oct 2010, 6:31 AM
Hey, this works. :-) Thanks!!!
I have to use 3.1.1 because there is an integration server that only uses extjs libraries in version 3.1.1.

greetings,
Thomas