Return to default order

Return to default order

GerardoGerardo Posts: 66Questions: 0Answers: 0
edited March 2011 in General
Assume aaSorting is [].

Each sortable header start in an unordered state, and has two others, ascending and descending.

However once you pick one, the choices are now ascending and descending, but unordered is no longer available.

Any simple way to do this? It is a datables issue or a jquery-ui one? Or should think on adding a button for this (which would kill ALL orders)?

Thanks,
Gerardo

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    Hi Gerardo,

    There is an API function which can be used to zero out the sorting order and restore it to the default: http://datatables.net/plug-ins/api#fnSortNeutral . You could attach this to a button if you wished.

    I suppose it might be an idea in future to provide this as a configurable option in DataTables, click 1 gives ASC, click 2 gives DESC, click 3 gives original sort order... Added to the list.

    Regards,
    Allan
  • GerardoGerardo Posts: 66Questions: 0Answers: 0
    Thanks,
    Gerardo
This discussion has been closed.