Column names from column.name
Column names from column.name
moose56
Posts: 7Questions: 3Answers: 0
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.title
rather thancolumns.name
. Thename
option isn't used by the end user interface at all and is only really useful for a selector. Thetitle
option sets the visible title.Allan
How did I manage to miss that option!!
Thanks Allan.