I have an API that returns some negative numbers for the Id field. Here is my datatables script:
$(document).ready(function () {
$('#myTable').DataTable( {
ajax: {
url: '@Url.Content("~/api/cas/nodes/all/lastcondition/")',
"columns": [
{ "type" : "num", "data": "Id"},
{ "data": "Name" },
{ "data": "Alias" },
{ "data": "DateQuery" },
{ "type" : "num", "data": "Condition" },
{ "type" : "num", "data": "TimeSecLastCondition" }
]
}
} );
});
JSON returned from ajax query:
{
"data": [{
"Id": -2144725655,
"Name": "NodeName",
"Alias": "NodeAlias",
"DateQuery": "2015-11-13T08:16:04",
"Condition": 0,
"TimeSecLastCondition": 1558
}]
}
Error:
"Requested unknown parameter '0' for row 0, column 0."