Filter column by range_number_slider
Filter column by range_number_slider
Innocent
Posts: 3Questions: 1Answers: 0
Im trying to filter my quantity which look like this -18.00 and it giving me any error saying it not a number(NaN).
I've tried using ignore_char:"-" but still would give me the same error message.
Please help
This discussion has been closed.
Answers
provide some code sample / jsbin / etc...
Thanks daniel for a prompt reply. I've managed to fix the problem by adding one line of code inside the findMaxInArray and findMinInArray which force the value to be integer of default to one.
var num = parseInt(array[i]) || 0;
narray.push(num);
One other problem i have is the fact that im unable to edit the lengthmenu which appears on my top left, currently the dropdown only shows 10, 25 50 100 and i want to add Show All to the list.
Please Help
take a look at my answer...
http://stackoverflow.com/a/24068820/617373
Use aLengthMenu and iDisplayLength for setting the default view, like this:
$('#example').dataTable({
"iDisplayLength": 15,
"aLengthMenu": [[10, 15, 25, 35, 50, 100, -1], [10, 15, 25, 35, 50, 100, "All"]]
});
Second array will hold the values for that will be displayed in the drop down menu
Read more: https://datatables.net/examples/advanced_init/length_menu.html
Awesome, that solved the problem
Thanks Daniel