How to apply condition or function to "visible" property of column?
How to apply condition or function to "visible" property of column?
viksnanu
Posts: 7Questions: 5Answers: 0
I want to hide a column on first load of page or always on reload too according to a particular condition. Can we do this as we can do with mrender or render property of a columns. Please suggest and help.
This discussion has been closed.
Answers
Hi @viksnanu ,
You can hide columns with
column().visible()
(or multiple columns withcolumns().visible()
). You can call this in one of the callback functions, such asinitComplete
orxhr
,Cheers,
Colin
I had put code in initcomplete function but it works only once as after hiding once and on changing condition it doesn't revert it back
initComplete
only runs once. Did you try thexhr
event Colin suggested? It will run each time there is an ajax response.Kevin