Arrays and Columns

Arrays and Columns

efleddermanefledderman Posts: 7Questions: 0Answers: 0
edited August 2011 in Plug-ins
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().

Replies

  • fbasfbas Posts: 1,094Questions: 4Answers: 0
    edited August 2011
    I think you've made the problem more complicated than you need to.

    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
This discussion has been closed.