Add Custom Column
Add Custom Column
dtw11
Posts: 18Questions: 4Answers: 0
How can I add a customer column with glyphs? I am pulling in an array from a db connection and using the columns: parameter when rendering the table object. Thanks
This discussion has been closed.
Answers
I resolved with <th>Edit/Delete</th>. Then when creating my data array I added the column with a custom value. Then added the custom column name to the data object when generating the rows.
I presume you are using Editor here. You could use editor.add() method documentation at this link here - https://editor.datatables.net/reference/api/
No I can not use Editor since it costs as I understand it.
Yes - Editor is commercial software.
However, you might still find this example to be useful (focus only on the DataTables aspect if you don't want Editor). Specifically it uses
columns.defaultContent
to show the Edit/Delete links in each row. You could easily use icons for that instead and bind an event handler to them.Allan