How to change a column's "className" property?
How to change a column's "className" property?
tatsujin
Posts: 3Questions: 2Answers: 1
I can remove the class easily from the header and existing cells, but not new ones.
var col = table.column('something:name');
$(col.header()).removeClass('remove');
$(col.nodes()).removeClass('remove');
New rows will use the column definitions, so I want to change it... but how?
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
There is no option to change the
columns.className
option after initialisation. Would you need to usecreatedRow
orrowCallback
to add the classes as you require.I see. Well, I think I'll solve it in another way, almost the opposite.
Instead of adding the class to the column's definition I'll add the class on all existing cells in the column (and possibly in the column's renderer), which is then easy to remove the same way.