'Isuue with Hidden and fixedColumns in Datatable

I have a datatable with first 3 columns as fixed and last 2 columns (9th, 10th) are hidden.

"columnDefs": [{"targets":[9,10], "searchable":false, "visible":false}]

When I initialize datatable for first time it works fine. But on reinitializing Datatable( I am using destroy() before reinit), the columns do not remain fixed. If I remove the above option - "columnDefs" i.e Not keeping last 2 columns as hidden , I am not facing this issue. Any suggestions on this?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source