Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35373

Datasource is empty?

$
0
0

try to get this data into Array (e.g data.length = 3)
...
if(data.length > 0){
for (var i=0;i<data.length;i++){
...
datum+= [ +' " ' + data[i].name +' "," '
+ data[i].firstName +' "," '
+ data[i].lastName ] +','

at the end:
$('#example').dataTable( {
data: datum
} );

will get the warning: "DataTables warning: Requested unknown parameter 0 for row 0"

But the DataTable is able to display the data if i type manually for "datum"
datum=
[
['aaaa','bbbb','cccc'],
['dddd','eeee','fffff'],
['gggg','hhhh','iiiii]
]

Please help newbie to DataTable.
TIA


Viewing all articles
Browse latest Browse all 35373

Trending Articles