Datatable pagination not working
Datatable pagination not working
DatatablesUser1
Posts: 4Questions: 0Answers: 0
I have provided both .js files properly and trying to paginate my html table using $(#dataform).daaTable() ... in ready(). Pagination not working.
Related code
[code]
$(document).ready(function () {
$("#dataform").dataTable({
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"iDisplayLength":5,
"aLengthMenu": [[5, 15, 30, 60, -1], [5, 15, 30, 60, "All"]],
"aaSorting": [],
"fnDrawCallback":function(){
if(Math.ceil((this.fnSettings().fnRecordsDisplay()) >5)) {
$('.dataTables_length').css("display", "block");
} else {
$('.dataTables_length').css("display", "none");
}
if (Math.ceil((this.fnSettings().fnRecordsDisplay()) / this.fnSettings()._iDisplayLength) > 1) {
$('.dataTables_paginate').css("display", "block");
} else {
$('.dataTables_paginate').css("display", "none");
}
},
"oLanguage": {
"sLengthMenu": "Display _MENU_ billers per page.",
"sZeroRecords": "No matching billers found.",
"sInfo": "Showing _START_ to _END_ of _TOTAL_ billers.",
"sInfoEmpty": "Showing 0 to 0 of 0 billers.",
"sInfoFiltered": "(filtered from _MAX_ total billers)"
},
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
});
$("#dataform_first").prepend(' ');
$("#dataform_last").append(' ');
});
[/code]
My html table is not in form but nested within 3 table- Row, td etc.
[code]
...
....
.... <!- 3 nested tables -->
....
Displaying columns
Displaying data.
....
[/code]
Please suggest solution or a link to a simple dataTable() example which I could try by simply copying it.
Thanks in advance.
Girish Varde
Related code
[code]
$(document).ready(function () {
$("#dataform").dataTable({
"sPaginationType": "full_numbers",
"bJQueryUI": true,
"iDisplayLength":5,
"aLengthMenu": [[5, 15, 30, 60, -1], [5, 15, 30, 60, "All"]],
"aaSorting": [],
"fnDrawCallback":function(){
if(Math.ceil((this.fnSettings().fnRecordsDisplay()) >5)) {
$('.dataTables_length').css("display", "block");
} else {
$('.dataTables_length').css("display", "none");
}
if (Math.ceil((this.fnSettings().fnRecordsDisplay()) / this.fnSettings()._iDisplayLength) > 1) {
$('.dataTables_paginate').css("display", "block");
} else {
$('.dataTables_paginate').css("display", "none");
}
},
"oLanguage": {
"sLengthMenu": "Display _MENU_ billers per page.",
"sZeroRecords": "No matching billers found.",
"sInfo": "Showing _START_ to _END_ of _TOTAL_ billers.",
"sInfoEmpty": "Showing 0 to 0 of 0 billers.",
"sInfoFiltered": "(filtered from _MAX_ total billers)"
},
"aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, "All"]]
});
$("#dataform_first").prepend(' ');
$("#dataform_last").append(' ');
});
[/code]
My html table is not in form but nested within 3 table- Row, td etc.
[code]
...
....
.... <!- 3 nested tables -->
....
Displaying columns
Displaying data.
....
[/code]
Please suggest solution or a link to a simple dataTable() example which I could try by simply copying it.
Thanks in advance.
Girish Varde
This discussion has been closed.
Replies
I thought only both ...min.js are enough.
[code]
[/code]