Negative value sorting with dollers symbol
Negative value sorting with dollers symbol
rathinashanmugam
Posts: 1Questions: 1Answers: 0
I have some negative values in my dataset, when convert the negative datatables converts to the value it comes with in the brackets, so the sorting was not work perfectly, I need solution for proper sorting so help me from out of this.
This discussion has been closed.
Answers
Thanks for your question - however, per the forum rules can you link to a test case showing the issue please. This will allow the issue to be debugged.
Information on how to create a test page, if you can't provide a link to your own page can be found here.
Thanks,
Tom
After having another look, I believe this should help you out. This should sort negative values using both $(100) and ($100).
Thanks
Tom
Just to add to what Tom as said, his solution utilises a plug-in sorting method he has created. You need to use
columns.type
to tell DataTables which column to apply that sorting type to. We'll look at creating an automatic type detection plug-in for it in future :-)Allan