1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<?xml version="1.0" encoding="UTF-8" ?>
<dt-option group="columns">
<name>columns.className</name>
<summary>Class to assign to each cell in the column</summary>
<since>1.10</since>
<type type="string" />
<description>
Quite simply this option adds a class to each cell in a column, regardless of if the table source is from DOM, Javascript or Ajax. This can be useful for styling columns.
</description>
<example title="Using `className` to assign a class to the cells in the first column with `dt-init columnDefs`"><![CDATA[
$('#example').dataTable( {
"columnDefs": [
{ className: "my_class", "targets": [ 0 ] }
]
} );
]]></example>
<example title="Using `className` to assign a class to the cells in the first column with `dt-init columns`"><![CDATA[
$('#example').dataTable( {
"columns": [
{ className: "my_class" },
null,
null,
null,
null
]
} );
]]></example>
</dt-option>
|