Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35272

Get an array of column visibility?

$
0
0

Using the colVis plugin, I need an array of my table columns and their visibility (to load back later). So far:

table.on('column-visibility', function (e, settings, colIdx, visibility) {

$('thead tr th').each(function () {
    var item = {};
    item.name = table.column(this).header().id

    // not correct for true/false visibility
    //item.visible = table.column(this).visible()

    orderarray.push(item);
});

});

How do I get the visibility state of each column?


Viewing all articles
Browse latest Browse all 35272

Trending Articles