Display only a category at first then sort by date the rest of the categories

Display only a category at first then sort by date the rest of the categories

youcef.lebidyoucef.lebid Posts: 1Questions: 1Answers: 0

Hello everyone,

I am in fairly hard situation to solve. I looked around on the internet with no result.

I have some data in a Datatable. There is two columns that concern us. The first is called status and can take value like "pending", "archived", "valid" and "refused". The second one is the date of creation of the data.
I would like to show all the data whose status is pending first then display the rest of the data ordered by date (regardless of the status).
I use the server-side implementation of datatable.

Thank you for your time.

Answers

  • kthorngrenkthorngren Posts: 20,322Questions: 26Answers: 4,774

    Your server script is responsible for the sorting and searching. You will need to setup your data queries to retrieve the data in the order you want and return it in the AJAX response in that order as that is the order Datatables will display the rows. If you need help with this then please post specifics about what you are using server side.

    Kevin

This discussion has been closed.