I have integrated jquerydatatable in bootstrap framework and when i select All it is showing like this
Showing NaN to NaN of 7 entries.
Javascript
$(function () {
$('#example2').DataTable({
"lengthMenu": [5, 10, 50, "All"]
});
});
I have integrated jquerydatatable in bootstrap framework and when i select All it is showing like this
Showing NaN to NaN of 7 entries.
Javascript
$(function () {
$('#example2').DataTable({
"lengthMenu": [5, 10, 50, "All"]
});
});
Share
Improve this question
edited Jun 29, 2016 at 15:14
halfer
20.4k19 gold badges109 silver badges202 bronze badges
asked Jun 29, 2016 at 6:35
RajRaj
8791 gold badge10 silver badges23 bronze badges
2 Answers
Reset to default 5Reading the 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 seem to be equal to "All" in this case).
Try this, its working for me:
$(function () {
$('#example2').dataTable({
"iDisplayLength": 10,
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
});
});