Number of rows to display not working
Number of rows to display not working
keyroche
Posts: 4Questions: 0Answers: 0
Hello,
I have set my code for the DataTables initialization sets the number of rows to show as 5, 20, 30, 40, 50 in the selection, as seen below:
[code]"sLengthMenu": 'Display '+
'5'+
'20'+
'30'+
'40'+
'50'+
'All'+
' records',[/code]
I have 6 records in this particular table. With my thinking, it should show 5 of them since the first option is 5, but it shows all 6 records. If you select another number it changes to show that number, and it you go back to click on the 5 it works, but it does not show 5 to start with.
Is there a separate parameter to set up for the starting number of records to show?
Thank you,
Key Roche'
I have set my code for the DataTables initialization sets the number of rows to show as 5, 20, 30, 40, 50 in the selection, as seen below:
[code]"sLengthMenu": 'Display '+
'5'+
'20'+
'30'+
'40'+
'50'+
'All'+
' records',[/code]
I have 6 records in this particular table. With my thinking, it should show 5 of them since the first option is 5, but it shows all 6 records. If you select another number it changes to show that number, and it you go back to click on the 5 it works, but it does not show 5 to start with.
Is there a separate parameter to set up for the starting number of records to show?
Thank you,
Key Roche'
This discussion has been closed.
Replies
Here is my initialization
[code]
$(document).ready(function() {
$('#example').dataTable({
"iDisplayLength": 10,
"aaSorting": [[2,"DESC" ]]
});
} );
[/code]