views:

35

answers:

0

I use the following code to fetch a json and load it as content for a blank table which is added dynamically to the DOM by:

$('#a_dialog').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="tbl_random_number"></table>');

The reason for this is because I find it easier to construct a JSON object than to create a table element.

$.getJSON( "load_source/", null, function( json ) {
        table = $('#tbl_random_number').dataTable(json);
} );

Problem is, though I can set the data table's properties, and pass in aaData and aoColumns, how do I define the colspans / rowspans using this method???