Using buttons ColVis along with Grouping/Summing Rows
Using buttons ColVis along with Grouping/Summing Rows

Hi All - I'm adding grouping/summing rows through a drawcallback via manual HTML <tr><td></td></tr>, etc. using $(rows).eq( i ).before(rowHTML)
. This works fine, except when I use ColVis to show/hide columns it doesn't remove the grouping row <td>s, but it removes everything else fine. Is there a classname that I should be using on these <td>s so they're also removed? Or a callback I can use?
It appears there isn't a customize function, and I tried stateChange, but that wasn't firing. Curious if anyone else has solved this.
Thanks!
Answers
Just after posting I found column-visibility:
https://datatables.net/reference/event/column-visibility
In case anyone else is looking for the same, I ended up doing this:
Thank you so much! that code was very helpful for me c: