Reputation: 12054
My goal is to display only 10 first rows in datatable.
I use : pageLength: 10
This works fine when paging = true
However I don't want to display the pagination either:
When I put paging=false
, there is no pagination but ALL rows are shown.
Upvotes: 1
Views: 995
Reputation: 3735
Set paging to true, pageLength to 10 then add this to your table definition
initComplete: function () {
$("#example_paginate").css("display", "none");
}
where "example" is replace by the name of your table. It worked in my local environment.
Upvotes: 2