Hanlde null objects in retrieved AJAX data
Hanlde null objects in retrieved AJAX data
When consifuring the table I get JSON data from server and have the colum data set as:
columns: [
{ data: "LatestStatusRecord.Status", className: 'dt-center', }
]
If there is no LatestStatusRecord i get error becuase LatestStatusRecord.Status will not exisit. What can I do to handle this error? Do I need to do it server side (create the object even if record not exisit) or can I do it the options?
ERROR received
*DataTables warning: table id=TaskTableInner - Requested unknown parameter 'LatestGanttRecord.PercentComplete' for row 0, column 5. For more information about this error, please see http://datatables.net/tn/4*
This question has an accepted answers - jump to answer
Answers
Two options:
LatestStatusRecord
object, orAllan
I went with the render option.
Thank you.