Using server side ajax request and having trouble getting aoColumnDefs to work

Using server side ajax request and having trouble getting aoColumnDefs to work

compsultcompsult Posts: 13Questions: 0Answers: 0
edited June 2012 in DataTables 1.9
my debug code is otakul

I have tried debugging to see what is going on. I set a stop at line 370 (v1.9.1) and aoColDefs is null.

Anybody see anything? TIA...

Here is the dataTable call:
[code]
$('#countries-table').dataTable({
"bServerSide": true,
"sAjaxSource": "{% url get_countries_list %}",
"bJQueryUI": true,
"aoColumnsDefs": [
{ "sTitle": "Yeah", "aTargets": [ 0 ]},
{ "sTitle": "Name", "aTargets": [ 1 ]},
{ "sTitle": "Formal a Name", "aTargets": [ 2 ]},
{ "sTitle": "Capital", "aTargets": [ 3 ]},
{ "sTitle": "Currency a Code","aTargets": [ 4 ]},
{ "sTitle": "Currency a Name","aTargets": [ 5 ]},
{ "sTitle": "Phone a Prefix","aTargets": [ 6 ]},
{ "sTitle": "TLD","aTargets": [ 7 ]},
],
"sPaginationType": "full_numbers",
"sDom": '<"H"fp>t<"F"li>'
});

[/code]

Here is the table html
[code]




ID


Name


Formal name


Capital


Currency code


Currency name


Phone prefix


TLD







[/code]

Replies

  • compsultcompsult Posts: 13Questions: 0Answers: 0
    I misspelled aoColumnDefs as aoColumnsDefs (I added an "s")

    Oops!
This discussion has been closed.