Toggling column visibility removes table header title
I am using KTDatatables Metronic v7 and want to toggle column visibility.
This works perfectly in terms of removing the column from view and setting the parameter to true again to bring it back. However on bringing it back the table header column title is not restored. I need to execute an extra
How can I remove a column from view and bring it back including the table header?
Could you please try to use this function?
I tried. Does not work unfortunately.
Sorry for the inconvenience. Please note that we have stopped providing updates for KTDatatables since Metronic v8. For future data table updates, we use the Datatables.net plugin.
In our online demo, showing and hiding a column is working.
Please try to use datatable.columns instead of datatable.column function.
I tried to use columns instead of column, but this give error:
TypeError: undefined is not an object (evaluating 'delete options.columns[index].visible')
I checked the example of again
and applied it to my code. It works now. Thanks!
Sorry for the delay. Glad you found it. Feel free to let us know if you need any help.