Is it possible to use ColReorder in conjunction with footerCallBack?
Is it possible to use ColReorder in conjunction with footerCallBack?
WillianRoby
Posts: 3Questions: 2Answers: 0
in ColReorder
In a table, I have the footerCallBack added, but after starting to use ColReorder, report this error on the console: Failed to execute 'insertBefore' on 'Node': parameter 1 is not of type 'Node'.
I've been researching the error and I verified that it is because the footerCallBack generates a "colspan" and with colspan it is not possible to use ColReorder.
Is it already possible to solve this problem?
This question has accepted answers - jump to:
This discussion has been closed.
Answers
Here is an ColReorder example with footerCallback. Note the example has one
th
for each column. it also usescolReorder.transpose()
to get the reordered index.I believe you will need to remove the
colspan
and have oneth
for each column.Kevin
I understood! But is it really not possible to use the Colspan attribute in conjunction with ColReorder? I need to use Colspan.
My guess is ColReorder doesn't analyze the footer and expects a one for one
thead
andtfoot
mapping. Datatables does require uniqueth
for each column in the header. See this example for detauls.One option might be to create the footer after Datatables initializes. Datatables won't know about the footer and ColReorder won't affect the footer. See this example:
http://live.datatables.net/fatalohu/1/edit
However the
column().footer()
API and usingfooter: true
with the export Buttons won't work. You can usemessageBottom
as shown in this example to show your footer calculations.Kevin