Reputation: 345
Paging type in DataTable is not working:
Code in my controller:
$('#report1').DataTable({
"processing": true,
"serverSide": true,
"searching": false,
"lengthChange": false,
"sDom": 'lrtip',
"sPagingType": "full_number",
"iDisplayLength": 5,
"info": false,
"retrieve": true,
"ajax": {
'url':...
Code in my html-file
<table id="report1" class="table table-striped table-bordered table-hover dataTables-example" cellspacing="0" width="100%"> ...</table>
Upvotes: 2
Views: 6726
Reputation: 345
Happened!
I added in my index.html file-css from:
<link rel="stylesheet" type="text/css" media="screen" href="https://cdn.datatables.net/1.10.12/css/jquery.dataTables.min.css">
Thanks for help :)
Upvotes: 0
Reputation: 58880
Use sPaginationType
(v1.9+) or pagingType
(v1.10+) to set pagination style. Also one of the options is full_numbers
, not full_number
.
For example:
$('#example').DataTable({
"sPaginationType": "full_numbers"
});
or
$('#example').DataTable({
"pagingType": "full_numbers"
});
See pagingType
or sPaginationType
for more information.
Upvotes: 2