Table search and pagination with colspan
-
I understand that you are supposedly unable to use the search and pagination and colspan at the same time and that functionality is controlled by DataTables. Their site has an example that uses all three functions at the same time. Is there a way to get that working properly here?
Right now I can only get the colspan columns to line up if I insert this code show below in the custom commands field for the table, but if I do this the search function disappears:
‘var table =jQuery(‘#bwki_sites_display’).DataTable( { ‘pageLength’: 10, ‘lengthMenu’: [ 10, 20, 50, 100, 200 ], ‘order’: [[ 0, ‘desc’ ]], } ); table.rows().every( function () { var row = table.row( $(this)); html = ‘<i class=”fa fa-plus”></i>Colspan will come here’; row.child(html).show(); $(this).addClass(‘shown’); });’As the table is coded now, and I put something in the search box the ‘previous’ and ‘next’ pagination shows up, but this does not show up on initial page load.
Any suggestions to getting all of these working at the same time?
The topic ‘Table search and pagination with colspan’ is closed to new replies.