How to add columns dynamically to Datatables??
How to add columns dynamically to Datatables??
AdityaDev
Posts: 2Questions: 2Answers: 0
I have a table without table head,I want to add table head/Columns and data from server.Is there any way to do this.Please help me out
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This question gets asked quite often so I created this example:
http://live.datatables.net/fafuyeyu/55/edit
The is only a
table
tag created. It usescolumns.title
to set the column title. It builds thecolumns.data
from the keys returned in the first JSON object. However you could have your server script return this info.Kevin