Filtering currency not working properly

Filtering currency not working properly

restreporestrepo Posts: 4Questions: 2Answers: 0

As I understand it should work automatically, but currently I have currency values in a column
for example "$1,200" or "$5.57"
but when searching "1200" the row isn't displayed.
I tried setting it manually with
type: "num-fmt" and "html-num-fmt"
but the result is still the same, is there anything I can do?

Answers

  • restreporestrepo Posts: 4Questions: 2Answers: 0

    Additional information - class of the currency row was set to sorting_1, as
    <td class="sorting_1">$1,200</td>

  • allanallan Posts: 63,455Questions: 1Answers: 10,465 Site admin

    DataTables will search on the original data, so if your original data is $1,200, then you'd need to search 1,200 (i.e. with the comma).

    If however you use DataTables to format a number (e.g. 1200), then yes you would be able to search on just 1200.

    Allan

This discussion has been closed.