PDA

View Full Version : Problem with Ext.PagingToolbar method moveLast



davion
2 May 2011, 11:18 AM
Hi All!

I have a Ext.grid.EditorGridPanel populated from database, and use Ext.PagingToolbar to make a pagination.

The problem is at first time displaying the grid I need select last page

here how I try it:


ListingEditorGrid = new Ext.grid.EditorGridPanel({
id: 'ListingEditorGrid',
store: DataStore,
cm: ColumnModel,
region: 'north',
layout: 'fit',
height:250,
enableColLock:false,
clicksToEdit:2,
selModel: new Ext.grid.RowSelectionModel({singleSelect:true}),
bbar: new Ext.PagingToolbar({
pageSize: 20,
store: DataStore,
displayInfo: true
})
});
Window = new Ext.Window({
id: 'Window',
title: 'History',
closable:true,
width: 700,
height: 400,
plain:true,
layout: 'fit',
closeAction: 'hide',
autoDestroy: false,
items: ListingEditorGrid
});
/*Now we display Window with the grid and try to set last Page */

DataStore.load({params: {subtask: "LISTING", myid: MyID }});
Window.show();

ListingEditorGrid.getBottomToolbar().moveLast();



The result is empty page #0 in grid with 4 pages. The logs of Apache says that it sends parameters
to server like: "start=-20&limit=20" and this is confusing me.

BTW using methods:
ListingEditorGrid.getBottomToolbar().moveFirst();
ListingEditorGrid.getBottomToolbar().moveNext();
etc works as expected.

If someone can tell is it a bug or my mistake on the way?

thanks

albanirneves
16 Feb 2015, 12:16 PM
I'm have this problem davion. Have you ever found the fix to it? Can anyone help us?