Reputation: 105
I am using the Datatables jquery plugin and have a table with a fixed column:
new $.fn.dataTable.FixedColumns(oTable);
Now the fixed column appears to be a clone of the real column and the clone is displayed over the table making it look fixed.
For this cloned column how can I have a specific class added to each of the rows?
This table is paginated and used server side data for each page.
Upvotes: 2
Views: 222
Reputation: 105
Following nikhil's suggestion with "sClass" and the Datatables documentation of "aoColumns".
oTable = $('#the-table').dataTable({
' aoColumns' : [
{'sClass' : 'clickable'} // adds css class "clickable" to the first column
]
});
Upvotes: 1
Reputation: 201
using sclass attribute like:
{ "mData": "Bound","sClass"="yourClassName" "sTitle": "Bound" }
this will add the class attribute to the html code generated by datatable plugin
hope this helps
Upvotes: 0