Datatable pagination not working

Datatable pagination not working

DatatablesUser1DatatablesUser1 Posts: 4Questions: 0Answers: 0
edited December 2013 in General
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

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Please link to a test case showing the issue: http://datatables.net/forums/discussion/12899/post-test-cases-when-asking-for-help-please-read
  • DatatablesUser1DatatablesUser1 Posts: 4Questions: 0Answers: 0
    I studied minimum requirement and found that I was missing reference to the first script as below.
    I thought only both ...min.js are enough.
    [code]



    [/code]
This discussion has been closed.