I am trying to render the column header in a datatables cell. So far I am using columnDefs to adjust the contents of a cell, and I wish to add the column header or title:
"columnDefs": [ {
"targets": [6], "render": function (data, type, column) {
return '?continent='+column[1]+'?filter='+this.header;
}
}]
I have been able to return the column header in the console or as an alert: (https://datatables.net/reference/api/column().header())
but not as text in the cell
Fiddle: http://jsfiddle.net/bbLjzspf/3481/ I would like the header of column 1 - Position - to be inserted into the link where I have written Col1header. Result for row 1 would look like: "tom.html?office=Tokyo?filter=Position"