Reputation: 963
I am using jQuery's datatable and I occasionally toggle the visiblity of some of the columns using the below code
tableId.fnSetColumnVis(0, false);
Having done that, there are some other controls on the UI that I was to toggle the visibility for. So, I need to check (Say on page load) if the column with 0 index is visible/hidden/present - whatever.
Please advise. Thanks
Upvotes: 0
Views: 2722
Reputation: 7031
If you want to know if a column is visible or not you can do this :
//options are the datatable options
options.fnDrawCallback = function(oSettings) {
if (oSettings.aoColumns[0].bVisible)
{
...
}
};
Upvotes: 1