How get Name of Title of column?
How get Name of Title of column?
casuist
Posts: 41Questions: 16Answers: 0
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);
});