1. #1
    Ext User
    Join Date
    Sep 2009
    Posts
    1
    Vote Rating
    0
    Ganjuu is on a distinguished road

      0  

    Question PagingToolbar Reset

    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.
    Attached Images
    Last edited by Ganjuu; 25 Sep 2009 at 11:04 PM. Reason: Added Images twice

  2. #2
    Sencha User aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,487
    Vote Rating
    139
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default

    This appears to be a bug. The PagingToolbar should subscribe to the clear event and update its buttons and text.
    Aaron Conran
    @aconran

  3. #3
    Sencha Premium Member Mjollnir26's Avatar
    Join Date
    Oct 2008
    Location
    Germany
    Posts
    161
    Vote Rating
    0
    Mjollnir26 is on a distinguished road

      0  

    Default

    Is this fixed yet? Gettin the same in a one-day-old Version of 3.0 fresh outta the svn

  4. #4
    Sencha Premium Member Mjollnir26's Avatar
    Join Date
    Oct 2008
    Location
    Germany
    Posts
    161
    Vote Rating
    0
    Mjollnir26 is on a distinguished road

      0  

    Default Little hack till this works the way i need it

    Code:
    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;
        }
    });

Thread Participants: 2