Set column header text
Set column header text
N0tChris
Posts: 7Questions: 0Answers: 0
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!
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!