Column names from column.name
Column names from column.name
Hi,
Currently I am specifying my table HTML to include the column headers like this:
<table>
<thead>
<tr>
<th>ID</th>
<th>Title</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
If I only specify and empty table tag DataTables does the work of creating the correct mark up within the table based on the columns option apart from setting the column name. Is this possible? Is there a property from column that I have missed? columns.name does not seem to do this, should it?
Thanks,
David.
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
I think you want
columns.titlerather thancolumns.name. Thenameoption isn't used by the end user interface at all and is only really useful for a selector. Thetitleoption sets the visible title.Allan
How did I manage to miss that option!!
Thanks Allan.