Child rows with pagination
Child rows with pagination
tirantvcia
Posts: 2Questions: 1Answers: 0
Can I implement the pagination on DataTables Grouped child row?
I have a datatable with 3 rows, where I'd like to show some child rows inside with pagination because I only need to show 10 elements per main row.
I define two datatables, one of them for "parent" table and the second for child rows, but unfortunately does not show the pagination and shows all child elements.
apiDataTableSearchList = $('#table_parent').DataTable({
"iDisplayLength": 10,
"bLengthChange": false,
"bStateSave": false,
/* Disable initial sort */
"aaSorting": [],
"bFilter": false,
"aoColumnDefs": aoColumnDefs,
"fnDrawCallback":function(){
$('.dataTables_paginate').css("display", "none");
$('.dataTables_length').css("display", "none");
$('.dataTables_filter').css("display", "none");
},
"oLanguage": {
"sInfo": "",
"sInfoFiltered": "",
"sInfoEmpty": "",
"sSearch": ""
}
});
var aoColumnDefs = [
{"sWidth":"20px", "aTargets":[0]},
];
versionsTable = $('#table_child').dataTable({
//"bRetrieve": true,
"iDisplayLength": 10,
"bProcessing": true,
"bPaginate" : true,
"sPaginationType": "full_numbers",
"bStateSave": false,
"bFilter": false,
"bLengthChange": false,
"aoColumnDefs": aoColumnDefs,
"oLanguage": oLanguage });
Regards
Jose Pascual
This discussion has been closed.
Answers
Hello,
I've been proving with "bPaginate" : true, "sPaginationType": "full_numbers" variables in child row datatable, and I've seen that these parametres does not work correctly.
The problem is the pagination numbers and 'First', 'Previous', 'Next' and 'Last' buttons are showing, but all elements are showed in one page, when the correct are 2 or more pages with pagination.
Do you know where is the problem?
Thanks.
Regards