Does "data" field of "columns" works only for Ajax datasource ?
Does "data" field of "columns" works only for Ajax datasource ?
Does "data" field of "columns" works only for Ajax datasource ?
I have JS array with object something like this :
var tableData =
[
{
"channelName" : "label 1"
},
{
"channelName" : "label 2"
}
]
Now when i try to create datatable with below code then i am getting error. as
Requested unknown parameter 'channelName' for row 0, column 1.
$('#monhtlyEstimateView').DataTable({
"data" : tableData,
"columns": [
{
"title" : "Channel Name",
"data": "channelName",
}
]
});
This question has an accepted answers - jump to answer
Answers
The code you posted works here:
http://live.datatables.net/qukeqada/1/edit
The curious part is the error refers to column 1. Do you have more than one column in your table?
Kevin
There was issue in my render method but not sure why debugger was not going inside and was getting datatable warning alert.
Thanks
Maybe you can update the example with your data and full Datatables config so we can help debug.
Kevin