cannot load Javascript array of array in the datatable plug in. I am using datatable v1.9
cannot load Javascript array of array in the datatable plug in. I am using datatable v1.9
pkharvi
Posts: 2Questions: 0Answers: 0
Here is my Javascript datasource which is array of array.
[quote]
aaData
- [0]
- Action ""
- Activity Name "Name1"
- Contact "value"
- Due Date ""
- [1]
- Action ""
- Activity Name "Name2"
- Contact "value"
- Due Date ""
...etc
[/quote]
and Here is my datatable plug in
[code]
$('#tblMyTraining').dataTable({
"bPaginate": false,
"bFilter": false,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"sScrollY": "200px",
"bScrollCollapse": true,
"bDeferRender": true,
"bProcessing": true,
"aaData": oData,
"aoColumnDefs": [
{ "aTargets": [ 0 ]
}],
"aoColumns": [
{ "mDataProp": "Action" },
{ "mDataProp": "Activity Name" },
{ "mDataProp": "Contact" },
{ "mDataProp": "Due Date" }
]
});
[/code]
[quote]
with this code the datatable is showing the following error
[code]DataTables warning (table id = 'tblMyTraining'):Requested unknown parameter 'Action' from datasource for row 0[/code]
[/quote]
[quote]
aaData
- [0]
- Action ""
- Activity Name "Name1"
- Contact "value"
- Due Date ""
- [1]
- Action ""
- Activity Name "Name2"
- Contact "value"
- Due Date ""
...etc
[/quote]
and Here is my datatable plug in
[code]
$('#tblMyTraining').dataTable({
"bPaginate": false,
"bFilter": false,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"sScrollY": "200px",
"bScrollCollapse": true,
"bDeferRender": true,
"bProcessing": true,
"aaData": oData,
"aoColumnDefs": [
{ "aTargets": [ 0 ]
}],
"aoColumns": [
{ "mDataProp": "Action" },
{ "mDataProp": "Activity Name" },
{ "mDataProp": "Contact" },
{ "mDataProp": "Due Date" }
]
});
[/code]
[quote]
with this code the datatable is showing the following error
[code]DataTables warning (table id = 'tblMyTraining'):Requested unknown parameter 'Action' from datasource for row 0[/code]
[/quote]
This discussion has been closed.
Replies
Allan
http://live.datatables.net/idinat/84/edit