How get Name of Title of column?
How get Name of Title of column?

column().name() or column().title() Not Work. No function message.
How get Name of Title of column?
Thanks!
This discussion has been closed.
column().name() or column().title() Not Work. No function message.
How get Name of Title of column?
Thanks!
Replies
Hi @casuist ,
Do you mean the text in the header cell, you can use
column().header()
for that - see example here.Cheers,
Colin
Hi @casuist,
you can also use this
const table = $('#example').DataTable();
table.context[0].aoColumns.forEach(function (column) {
console.log("id:", column.idx, "name: ", column.title);
});