Hybrid View

  1. #1
    Sencha User DTT_11-1983's Avatar
    Join Date
    Apr 2008
    Posts
    92
    Vote Rating
    2
    DTT_11-1983 is on a distinguished road

      1  

    Default Help - How to remove sort field when reload grid

    When I click on the column header to sort column and click reload button on paging toolbar, the column still keep sort. How can I reset it. Thanks
    Sorry for my bad English.

  2. #2
    Ext User
    Join Date
    Jun 2008
    Posts
    4
    Vote Rating
    0
    v.sushma is on a distinguished road

      0  

    Default

    Add this line

    stateful: false,
    in new Ext.grid.GridPanel

  3. #3
    Sencha User DTT_11-1983's Avatar
    Join Date
    Apr 2008
    Posts
    92
    Vote Rating
    2
    DTT_11-1983 is on a distinguished road

      1  

    Default

    Thanks v.sushma so much.
    But the column still keep sort. I want reset it when grid is reloaded
    Sorry for my bad English.

  4. #4
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,555
    Vote Rating
    60
    Animal will become famous soon enough Animal will become famous soon enough

      0  

    Default

    Code:
    delete myStore.sortInfo;

  5. #5
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    104
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default

    Example:

    Code:
    bbar: new Ext.grid.PagingToolbar({
      onClick: function(which) {
        if (which == 'refresh') {
          delete this.store.sortInfo;
        }
        Ext.grid.PagingToolbar.prototype.onClick.apply(this, arguments);
      }
      ...
    })

  6. #6
    Sencha User DTT_11-1983's Avatar
    Join Date
    Apr 2008
    Posts
    92
    Vote Rating
    2
    DTT_11-1983 is on a distinguished road

      0  

    Default

    Thanks Animal and Condor. The sortInfo now deleted successful. How can I reset the GUI ? I want to remove sort arrow on column header, too.
    Sorry for my bad English.

  7. #7
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,555
    Vote Rating
    60
    Animal will become famous soon enough Animal will become famous soon enough

      0  

    Default

    Yes, there's a bif of a gap here. You'll have to do it yourself:

    Code:
    myGrid.view.getHeaderCell(columnIndex).removeClass(["sort-asc", "sort-desc"]);