PDA

View Full Version : PagingToolbar Reset



Ganjuu
25 Sep 2009, 10:59 PM
I am using Ext.grid.GridPanel and in that I am having Grid and an Ext.PagingToolbar.

I have the following functionality.
Creating User Info Details. When creating new user info Details, the Grid in the GridPanel and the Paging Tool bar is empty and it doesn’t contain data.

But when I Edit User Info and after that when I try to create new user info, that time,
I am clearing the grid by using the below statement.

targetIncludeGrid.getStore().removeAll();

Inspite of it, the PagingToolbar is able to retain the data and populates the data in the Grid when I refresh the PagingToolBar.

aconran
27 Sep 2009, 10:25 AM
This appears to be a bug. The PagingToolbar should subscribe to the clear event and update its buttons and text.

Mjollnir26
29 Sep 2009, 7:46 AM
Is this fixed yet? Gettin the same in a one-day-old Version of 3.0 fresh outta the svn

Mjollnir26
29 Sep 2009, 9:51 AM
Ext.ns('Ext.ux');
Ext.ux.PagingToolbar = Ext.extend(Ext.PagingToolbar, {
//Reset to original state!
reset: function() {
this.updateInfo();
this.inputItem.setValue(1);
this.afterTextItem.setText(String.format(this.afterPageText, 1));
this.next.setDisabled(true);
this.prev.setDisabled(true);
this.first.setDisabled(true);
this.last.setDisabled(true);
},

initComponent : function()
{
Ext.ux.PagingToolbar.superclass.initComponent.call(this);
this.refresh.hide();
},

getItemId: function()
{
return this.id;
}
});