sort numeric cells, empty at very bottom
sort numeric cells, empty at very bottom
![nick7777](https://secure.gravatar.com/avatar/6d7fd0b93e5684de077bdbf582d7270c/?default=https%3A%2F%2Fvanillicon.com%2F6d7fd0b93e5684de077bdbf582d7270c_200.png&rating=g&size=120)
If I sort a column I want the empty cells to stay at the very end of the column. Therefore I integrated the following into my JS function:
{type: 'non-empty-string', targets: 3}
https://jsfiddle.net/nickkkk/nghmk7u1/6/
It works, but as soon as this statement is integrated the sorting function on numeric columns is not working anymore.
Example: Name does sort as expected, Age does not:
How can I solve this?
This discussion has been closed.
Answers
Hi @nick7777 ,
You want to use the absolute plugin for that - there's a few examples on that page that should get you going,
Cheers,
Colin
Hi @colin ,
Thanks for the answer. While it is working very well on columns with numbers, it isn't with my formatted date column. Can you have a look at my date column? https://jsfiddle.net/nickkkk/8qbLjohn/15/
Hi @nick7777 ,
That example works for me. If I order by any of the columns with blanks, those blanks are on the bottom, even the date column - see here.![](https://datatables.net/forums/uploads/editor/hf/2klybm2uwotm.png)
What makes you think it isn't working?
Cheers,
Colin