I can set the searchable option on a column when I define it, but when I dynamically hide/show other columns, I'd like to also update the searchable value. I con't want my newly hidden columns to be searchable. Something like below:
applyColumnChanges = function (datatable) {
var i,
hiddenColumns = [];
for (i = 0; i < scope.columnDefinitions.length; i++) {
datatable.column(i).visible(scope.columnDefinitions[i].visible);
datatable.column(i).searchable = scope.columnDefinitions[i].visible; //would be nice if this worked
if (!scope.columnDefinitions[i].visible) {
hiddenColumns.push(scope.columnDefinitions[i].data);
}
}
return hiddenColumns;
};
Any idea if this is currently possible?