Problem with multiple tables in one page
Problem with multiple tables in one page
JochenK
Posts: 70Questions: 11Answers: 0
Link to test case:
https://live.datatables.net/himupozu/1/edit
Since updating to the latest Datatable version, several datatables in one page no longer work.
I tried to change this according to the example in "Default styling options", but without success.
What can I do ?
This question has an accepted answers - jump to answer
Answers
I'm not sure what this code is so I commented it out:
Now the test case has these two errors:
You will need to look at
iNetScripts.js
to debug this.You have this buttons definition:
The columns defined is for a table with 11 columns (0-10) but both tables have only 8 columns. Change to
columns: [2,3,4,5,6,7],
and it will work:https://live.datatables.net/himupozu/3/edit
Kevin
"dt_demo.init();" I also took the text from the example "Default styling options".
The colvis Button i have now deleted.
Everything looks much better now, thank you.
https://live.datatables.net/xugojaxo/1/edit
But there are differences between the two tables.
The headlines has different heights
The second has no border-cells
Is this a matter that can be solved with datatables?
Not sure what you mean by headline. Are you referring to the
accordion
div
? If yes then it seems the amount of text is causing wrapping and the height difference. This is not a Datatables element so you will need to apply custom styling to control the heights.Compare the two
table
tags. The first you have the Bootstrap callscell-border
and the second you don't. Add that class to the secondtable
tag.Kevin
Thanks for your hint.
It was my mistake that I overlooked the differences in the lines.
I have now set the lines "<table class="demo ... " as they should be.
Many thanks for your support.