can't initiate with aoColumns and mData

can't initiate with aoColumns and mData

yee379yee379 Posts: 6Questions: 0Answers: 0
edited October 2012 in DataTables 1.9
i have the following code:

[code]



device




[/code]

[code]
(function() {

jQuery(function() {
$('.datatables').dataTable({
bProcessing: true,
aaData: [
{
"device": "one"
}, {
"device": "two"
}, {
"device": "three"
}
],
aoColumns: [
{
mData: "device",
sDefaultContent: "-"
}
]
});
});

}).call(this);
[/code]

but i can't get it to work! i see that it shows the correct number of rows (3), but the content is all '-' (from sDefaultContent). if i remove the sDefaultContent, then i get

[quote]
DataTables warning (table id = 'DataTables_Table_0'): Requested unknown parameter '0' from the data source for row 0
[/quote]

i'm using 1.9.2.

(sorry i can't use the debugger, all my stuff is on the intranet here)

Replies

  • yee379yee379 Posts: 6Questions: 0Answers: 0
    i fixed it. it appears that 1.9.2 only supports the "mDataProp" definition.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Correct - mData was introduced in 1.9.3 :-).

    Allan
This discussion has been closed.