Filter Range

Filter Range

Massimo74Massimo74 Posts: 85Questions: 1Answers: 0

Hello i have a problem, here
column "SALARY" the problem is to return the data in this line;
return data; WORK FILTER
return '<span style="color:' + color + '">' + formatMoney(data) + ' €</span>'; FILTER NOT WORK

Replies

  • sandysandy Posts: 913Questions: 0Answers: 236

    Hi Massimo74,

    The issue is that you are assigning the for both type = 'display' and type='filter' to

    $.fn.dataTable.render.nummber(',', '.', 2, '€').display(data)

    So in your min_max function intval(data[icol]) does not return a number so you set valcol to 0 so any number over 0 will return no data to your table.

    The fix is to just return data when the type is 'filter', in your render function. And to return

    $.fn.dataTable.render.nummber(',', '.', 2, '€').display(data)

    Take a look at a copy I made here.

    Hope this helps,

    Sandy

This discussion has been closed.