how do I change order of a hidden column once visible dynamically
how do I change order of a hidden column once visible dynamically
I have a preferance setting to hide or show a column assigned to a parameter. Once initialized if the column was checked for visibility I want to make orderable false for the column. I am trying to use this idea but cannot find a good examlpe to work off.
Can it be done after iniialisation? ( FYI: I'm doing this on a jsp page..The below code works
$.extend( true, $.fn.dataTable.defaults, {
"initComplete": function(settings, json) {
alert( 'DataTables has finished its initialisation.' );
}
}
Answers
Hi @storres56 ,
I don't quite understand what you're after, but you can change the visibility of a column with
column().visible()
. You can't change whether a column is orderable post-initialisation through the API, but you can remove theclick
even listener from the header of that column (and again on every draw as it would be reinstated).Hope that gets you moving at least,
Cheers,
Colin