I need to Create a New column to Datatable.
Do you mean you want to add it to the table dynamically? If so, that is not a feature of DataTables at this time. You need to have the number of columns configured at initialisation time.
Allan
The only option is to destroy the table with destroy() method, add a new column or change DataTables configuration and re-initialize the table.
destroy()
See more articles about jQuery DataTables on gyrocode.com.
You could create an empty column and set it invisible until you need it.
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
Do you mean you want to add it to the table dynamically? If so, that is not a feature of DataTables at this time. You need to have the number of columns configured at initialisation time.
Allan
The only option is to destroy the table with
destroy()
method, add a new column or change DataTables configuration and re-initialize the table.See more articles about jQuery DataTables on gyrocode.com.
You could create an empty column and set it invisible until you need it.