Uncaught TypeError: Cannot read property 'length' of undefined
at jquery.dataTables.min.js:48
at i (jquery.dataTables.min.js:35)
at Object.success (jquery.dataTables.min.js:35)
at fire (jquery-1.10.2.js:3062)
at Object.fireWith [as resolveWith] (jquery-1.10.2.js:3174)
at done (jquery-1.10.2.js:8249)
at XMLHttpRequest.callback (jquery-1.10.2.js:8792)
Member
110 Points
387 Posts
Uncaught TypeError
Oct 31, 2019 06:58 AM|jsshivalik|LINK
Hi
Uncaught TypeError: Cannot read property 'length' of undefined
at jquery.dataTables.min.js:48
at i (jquery.dataTables.min.js:35)
at Object.success (jquery.dataTables.min.js:35)
at fire (jquery-1.10.2.js:3062)
at Object.fireWith [as resolveWith] (jquery-1.10.2.js:3174)
at done (jquery-1.10.2.js:8249)
at XMLHttpRequest.callback (jquery-1.10.2.js:8792)
Thanks
Participant
1780 Points
580 Posts
Re: Uncaught TypeError
Oct 31, 2019 08:14 AM|Yang Shen|LINK
Hi jsshivalik,
Please modify your code like below:
public JsonResult List() { return Json(new { data = usrDB.GetAllUser()}, JsonRequestBehavior.AllowGet); }
You need to make this format so that the datatable can receive the data.
Best Regard,
Yang Shen