Hiding a column sets colspan of each cell in the end grouping to max columns
Hiding a column sets colspan of each cell in the end grouping to max columns
Test case: http://live.datatables.net/rifigame/1/edit?html,js,output
When I use both the column visibility option and row grouping in a table and I hide a column it immediately sets the colspan of each cell in the grouping line to the number of columns in the table. Is this something that happens automatically, and if so, is there a way to turn it off or adjust it? I've looked into resetting the colspans after a draw, but it doesn't seem to change anything.
This question has an accepted answers - jump to answer
Answers
You need to use
column-visibility
to redraw the table to haverowGroup
update. I updated the example to usecolumn().index()
to get the visible index of the last column. This is used to create acolspan
for the left most columns. Your code might work but this seems simpler.http://live.datatables.net/rifigame/2/edit
Kevin
That worked. Thanks!