Set column header text
Set column header text

in DataTables
Hello,
I'm looking for a simple solution to set column header text in a table using complex headers (with colspan).
I know that we can loop on each column and log headers with this code :
table.columns().every(function () {
console.log(this.header());
// Here, I want to set column header text
})
But, it doesn't display column headers with colspan attributes...
Thanks for your answer!
This discussion has been closed.
Replies
The
column().header()
docs state this:You can use standard jQuery or Javascript methods to make changes to the header text.
Kevin
Thank you for your support. I find a way with jQuery as you suggested!