How to add custom attributes to a column

How to add custom attributes to a column

intuidointuido Posts: 1Questions: 1Answers: 0

Hi I'm trying to add a custom attribute to specific columns, I don't want to use DT_RowData to avoid repeating the same info for each row, (I only need it for the column header)
I tried something like this (see myCustomAttribute:true)

resultDataTable = self.$resultTable.DataTable({
"bFilter": false,
"bPaginate": false,
"bAutoWidth": false,
"dom": 'rt<"bottom"ifp><"clear">',
data: data,
columns: [
{ data: 'WorkTitle', width: "20%", myCustomAttribute:true},
{ data: 'AlternateTitle', width: "15%" },

but the new attribute doesn't appear when I iterate each column on the searchresultchanged event.

Is there a way to do something similar to this http://datatables.net/forums/discussion/10434/adding-custom-attributes-to-datatable

thanks

This discussion has been closed.