Column widths when hiding columns
Column widths when hiding columns
Hello Team!
I have spent all morning looking through these forms and other sites looking for some clarification regarding column widths, so I have come to ask here!
I have a colvis button and when I hide a bunch of my columns, the remaining ones stretch really long to the point where you cant even see the columns to the right.
Now I am using stateSave, so when the users refresh the page, this issue does get fixed, but what I am asking assistance with is;
* Is there a way that I can have the column widths resize when I hide columns?
- Also I have looked at bAutoWidth as well as fnAdjustColumnSizing and I could get neither to work as other people did.
Any assistance would be appreciated!!
Thank you for your time.
This question has an accepted answers - jump to answer
Answers
Looks like a CSS issue. This example seems to work:
https://datatables.net/extensions/buttons/examples/column_visibility/simple.html
Can you provide a link to your page or a test case replicating the issue? This way we can help debug the problem.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Ah, that is a good point.
I will play around with my css quickly, but if that doesn't work I will come back with a test case, assuming I can replicate it outside of my environment!
Many Thanks!
Ah I feel silly now!
I was playing around with the live data-tables site and I was able to confirm that you were correct and it was a CSS issue that I had.
Thanks a bunch for putting me in the right direction!
Thank you