Problem sorting "number_1 - number_2" column.

Problem sorting "number_1 - number_2" column.

lorenzoatlorenzoat Posts: 3Questions: 0Answers: 0
edited March 2012 in DataTables 1.9
Hi,

In the following url: "http://www.rlmm.org/ojs-files/search.php" , you will find the table page using Datatables...

I have been trying to sort the last column (pages), but it has been impossible. This column is tricky, why:

1.- It will be fill with hyphenated numbers (pages), ex: 20-29
2.- It could be empty.

This is the debub code: ajabis

I have been trying several answers from others topics and questions here at the forum..

I appreciate all the help I could receive..

Thanks for you splendid work,

Best Regards,

Tom

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    You'd need to create a sorting plug-in function that would sort the data based on what logic you want:

    http://datatables.net/development/sorting - how to write sorting plug-ins
    http://datatables.net/plug-ins/sorting - premade plug-ins

    Allan
  • lorenzoatlorenzoat Posts: 3Questions: 0Answers: 0
    Hi Allan,

    Thanks for your answer. I used the natural sorting plug-in and it is working flawlessly...

    Regards,
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Excellent - good to hear :-)

    Allan
This discussion has been closed.