How do I pass Column names
How do I pass Column names
anilkumar6714
Posts: 2Questions: 1Answers: 0
$(document).ready(function() {
$('#example').DataTable( {
"ajax": '../ajax/data/arrays.txt'
} );
} );
In the above code how do I pass Column names, because My requirement is to pass Columns dynamically, Column names and data is not same, Means based on column names the table will laod
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Do you mean like this?
https://www.datatables.net/forums/discussion/29260/dynamic-column-headers-via-ajax
Thanks for the reply ThomD,
that reference helped me to get Dynamic column names, but as i said my data is not in the format of Columns (i.e, data is in Objects format and columns are in Array format).
I have also tried the below reference
http://datatables.net/forums/discussion/6260/dynamic-column-names
Combining both references code it worked me fine :)
Thanks again for helping me out :)