dataTable not loading aaData parameter

dataTable not loading aaData parameter

austinbestaustinbest Posts: 4Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
So the table is on the page

[code]

[/code]

I then use AJAX to return the data

[code]
$.ajax({
type: 'POST',
url: "ticketAjax.php",
data: '&m=swapTicketList',
dataType: "json",
success: function(resultData) {
$('#ticketListTable').dataTable({
"aaData": resultData,
"aaSorting": [[0, "desc"]],
"bJQueryUI": true,
"bScrollInfinite": true,
"bScrollCollapse": true,
"bDestroy": true,
"bDeferRender": true,
"iDisplayLength": 100,
"sScrollY": "1000px",
"sDom": "Rlfrtip",
});
}
});
[/code]

The AJAX is working and returning

[code]
[{"ID":["17316","17314","17313","17312","17311","17310","17309","17308","17307"....
[/code]

However aaData is not populating the table with that Json data. Am i misunderstanding how this works? I have read quite a few forums and posts and they all appear to lead to this type of usage.

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Is `ID` a column in the table? If so, you need to tell DataTables that (and what the properties of the other columns are) by using mData . See: http://datatables.net/blog/Extended_data_source_options_with_DataTables

    Allan
This discussion has been closed.