I have checked several questions already about this topic here in stackoverflow, but they are all using the old dataTable. I am using DataTable. I populated my DataTable by
Another alternative is
dtColumns[index].visible = false/true;
To show or hide any column.