sClass is being applied to table headers
sClass is being applied to table headers
When using the sClass option for aoColumnDefs I noticed that it's applying the class to the element as well as to the elements for that column. I didn't think it was suppose to apply this to the elements. Am I wrong or do I have another issue going on to cause this?
This discussion has been closed.
Replies
Allan
actually sClass doesn't gives class to "each" cell in column. it doesn't work for cells in tfoot.
example for 3-column table with tfoot row for sums:
...
.red{ color: red; }
...
$("table").dataTable({
"aoColumns": [
{"sClass": "red"},
{"sClass": "red"},
{"sClass": "red"}
]
});
...
TOTALS
sum of col b
sum of col c
data in last row aren't red. if this is right behavior, i suggest to edit purpose of sClass in reference: "Class to give to _each_ cell in this column.".
i think it should work for tfoot too. for example: if numeric data are in column i give alignRight class to this column. in footer there is sum for each row in that column, so it should has this class too.
Thanks,
Allan
Allan