Results 1 to 5 of 5

Thread: how can i remove the sort in a grid panel

  1. #1
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33

    Default Answered: how can i remove the sort in a grid panel

    The each column in the grid panel can be sortable and you can sort the that according that column, but let's say that after i have sorted the data i decide that i like them the old way with no sort how can i remove the sort ?

  2. You can clear the sorters to remove any sorting:

    Code:
    store.sorters.clear();

  3. #2
    Sencha User
    Join Date
    Sep 2011
    Location
    Classified
    Posts
    3

    Default

    You could try reloading the grid (easy for finite data) or set up a mechanism (cookie, array, Store field 'previousPosition', etc) that remembers where the fields were before the sort took place
    "You can't cure Stupid." - Dr. Gregory House, House M.D.

  4. #3
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33

    Default

    There are several thing that i have in mind but first i wanted to ask if there wasn't some method that i missed in the docs.

  5. #4
    Sencha Premium User twaindev's Avatar
    Join Date
    Sep 2009
    Posts
    242
    Answers
    16

    Default

    You can clear the sorters to remove any sorting:

    Code:
    store.sorters.clear();

  6. #5
    Ext JS Premium Member
    Join Date
    Mar 2011
    Posts
    33

    Default

    The clear of the sorters helped me dig a little deeper. There also is need after the sorters are clear to find the column by which the grid was sorted and set it's sort state to null and the the data is returned to normal.

Posting Permissions

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