Arrays and Columns
Arrays and Columns
efledderman
Posts: 7Questions: 0Answers: 0
I'm trying to get aoColumns to extract it's information from an array in an external JS file, see code for more details. The reasoning is that I want the ability for tables of different structure types to be able to be loaded from the same code, just separate arrays.
Edit: Fixed but dynamically generating the table before applying DataTable().
Edit: Fixed but dynamically generating the table before applying DataTable().
This discussion has been closed.
Replies
the aoColumns object is an array of objects, so you just need to go through your dtColumns array and convert to object
[code]
var aoColumns = [];
for(var i=0; i