Search rendered currency data
Search rendered currency data

I am looking for a way to search the rendered result, I have tried the filter
option for render but I am having issues getting it to work.
For my serverside php file:
$columns = array(
array(
'db' => 'amount',
'dt' => 'withdrawal'
)
);
Under my columns
settings in my JS for the table I have:
columns:[
{
data: "withdrawal",
render: {
"filter": $.fn.dataTable.render.number(',', '.', 2, '$ ')
"display": $.fn.dataTable.render.number(',', '.', 2, '$ ')
}
}]
Now on my datatable, if I have a cell with data as 15, it displays the cell as $ 15.00 but when I search for that row, I must search using 15 and cannot search using 15.00. Same goes for $ 15.10, I must search for 15.1 and not 15.10
This question has an accepted answers - jump to answer
Answers
Does this mean you have server side. processing (
serverSdie: true
) enabled? If so it's up to your server script to perform the search. The client side has no involvement with searching or sorting.Kevin