I have a JSON object returned from a DataSet as below.
I use a DataSet rather than EF Model as the SQL query returns dynamic data. So the columns could be anything any time the query is called.
{
"Table": [
{
"Entity": "SP00",
"Period": "2017-08-31T00:00:00",
"Level": "Level 5",
"Errors": "Approved",
"Process": "Created"
}
]
}
I want to populate a Kendo UI Grid with this object. Here is my Kendo code...
self.GetTaskRecordOverviewTEST = function () {
$.getJSON(apiurl + 'task/GetTaskRecordsOverview', { Period: Period }, function (taskRecordData) {
$("#TESTdashboardOverviewGrid").kendoGrid({
dataSource: {
data: taskRecordData.data.Table
}
})
});
};
However, I get the error "Unable to get property 'Table' of undefined or null reference".
Any idea what is wrong with my code?