Results 1 to 10 of 14

Thread: Help - How to remove sort field when reload grid

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sencha User DTT_11-1983's Avatar
    Join Date
    Apr 2008
    Posts
    92
    Vote Rating
    2
      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
      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
      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,607
    Vote Rating
    59
      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
    118
      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
      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,607
    Vote Rating
    59
      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"]);

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •