Mapping NaN to NaN in jquery bootstrap datatable

I have a built-in jquerydatatable in the bootstrap framework, and when I select All, it shows it as

Display NaN for NaN of 7 entries.

Javascript

$(function () { $('#example2').DataTable({ "lengthMenu": [5, 10, 50, "All"] }); }); 
+6
source share
2 answers

Reading examples here :

 $('#example').DataTable( { "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]] }); 

So, add two arrays, one with values ​​and one with the texts shown.

(- 1, it seems, in this case it is equal to "Everything").

+5
source

Try this, its work for me:

 $(function () { $('#example2').dataTable({ "iDisplayLength": 10, "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], }); }); 
+2
source

All Articles