How to change bootstrap column width after hiding column

How to change bootstrap column width after hiding column

bungeegumybungeegumy Posts: 1Questions: 1Answers: 0

Good afternoon everyone,
I would like to dynamically change column width in my table after hiding column.
For instance, I have 12 columns now, each columns width is col-1. One case is I need to hide two columns, so I only have 10 columns, but the columns width is still col-1. I want to change the second column width to col-3.
I have tried in every way but I can't, can you help me?

Answers

  • allanallan Posts: 56,836Questions: 1Answers: 9,033 Site admin

    You mean change the class name on the column? You could use column().nodes() to get the cells for the column and then apply a class to it. You'd need to change it on the header and footer as well. draw is when to perform those actions.

    Allan

Sign In or Register to comment.