Sort numbers with string in one row

Sort numbers with string in one row

arelamarelam Posts: 1Questions: 1Answers: 0
edited October 2016 in Free community support

I have a table where one of the columns is numbers only and sorting is ok. But in my case sometimes one of the entries appears as pending (string) and sorting becomes as string. Is there a way to force it ignore the string and put it in the bottom of the column?

This question has an accepted answers - jump to answer

Answers

  • TechnodawgTechnodawg Posts: 4Questions: 1Answers: 0

    Did you ever resolve your issue? I have a similar problem.

  • ztevieztevie Posts: 101Questions: 23Answers: 5

    I wonder the same...
    I have all numbers in one column, but occasionally the value will be "EXTRA". I set the type to "num", and the sorting is ok with all the numbers, but the EXTRA rows will always be last, no matter if I sort the column asc or desc... I'd like them to be last when in ascending order, but come first when descending...

  • kthorngrenkthorngren Posts: 21,934Questions: 26Answers: 5,067
    Answer ✓

    Have yu tried the natural sorting plug-in:
    https://datatables.net/plug-ins/sorting/natural

    Kevin

  • ztevieztevie Posts: 101Questions: 23Answers: 5

    Thanks a million, Kevin!!
    Natural did excactly what I wanted. I need to check external plugins more I think... :)

This discussion has been closed.