Three states of a header "sort" decoration?

Three states of a header "sort" decoration?

rplantikorplantiko Posts: 18Questions: 1Answers: 0
edited October 2013 in General
Hi,

I have the requirement that the header sort state of a table can be altered through three states (and not two, as is):

1.) First click: Sort by this column ascending.
2.) Second click: Sort by this column descending.
3.) Third click: Remove any sorting by this column = Restore order, as it was before 1.)

(and then repeat with 1. on further clicks).


Is there an option to achieve this, or do I have to implement this logic myself.

Kind regards,
Rüdiger

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It could possibly be done with the asSorting option, but it would require an extension to the core to make happen. The reason being is that if you simply remove the search, it doesn't go back into its unordered state, it just stays i. Is currently sorted state, so it would need to recent to some other sorted state (data index order?)

    Allan
  • rplantikorplantiko Posts: 18Questions: 1Answers: 0
    Allan,

    thanks for your suggestions.

    But I found that you already *have* this three-state solution! It works precisely as requested when working with shift-click, i.e. when the user configures sorting with more than one column.

    The "Shift-Click" action is a bit hidden, but I was able to persuade my client to use it resp. to train the end-users about this feature.

    Thanks and regards,
    Rüdiger
This discussion has been closed.