Twitter Bootstrap pagination incompatibility with Row Grouping Plugin
Twitter Bootstrap pagination incompatibility with Row Grouping Plugin
I've successfully applied Twitter-bootstrap to my plain tables but encountered error on tables initialised with Row-grouping plugin.
The error
[code]DataTables warning (table id = 'example'): Cannot reinitialise DataTable.
To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy[/code]
I find out that repagination seems to cause the error and removing DT-bootstrap.js corrected the issue, however the pagination will not be in bootstrap formatting. Not a big issue but will appreciate any help in uniforming the looks of the tables.
Thanks.
The error
[code]DataTables warning (table id = 'example'): Cannot reinitialise DataTable.
To retrieve the DataTables object for this table, pass no arguments or see the docs for bRetrieve and bDestroy[/code]
I find out that repagination seems to cause the error and removing DT-bootstrap.js corrected the issue, however the pagination will not be in bootstrap formatting. Not a big issue but will appreciate any help in uniforming the looks of the tables.
Thanks.
This discussion has been closed.
Replies
Put your js at the bottom of your page
eg
[code]
$(document).ready( function () {
$('#example').dataTable().rowGrouping({ iGroupingColumnIndex2: 1,
sGroupLabelPrefix: "Category - ",
sGroupLabelPrefix2: "Group - ",
bHideGroupingColumn2: true,
bExpandableGrouping: false,
bExpandSingleGroup: true,
iExpandGroupOffset: -1,
sPaginationType: "bootstrap"});
} );
[/code]
Seriously, I will definitely donate to the developers ASAP. Datatables rock.