Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82141

sAjaxDataProp property set to "" (empty) but still receive an error

$
0
0
Hello - I have searched this forum, and the web for that matter, to not find the reason for my error. Below you will find the ajax call to my WebAPI MVC4 .NET WebAPI service. You will also find the return json object. Am I not using the sAjaxDataProp property correctly? I receive an error in the jquery.dataTables.js file. NULL error at:

var aData = _fnGetObjectDataFn( oSettings.sAjaxDataProp )( json )

$(document).ready(function () {
var oTable = $('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/api/signin",
"sAjaxDataProp": "",
"aoColumns": [
{ "mData": "User_ID" },
{ "mData": "First_Name" },
{ "mData": "Last_Name" },
{ "mData": "Username" },
{ "mData": "Password" },
{ "mData": "Email_Address" }
]
});
});

JSON returned:
[{"User_ID":1,"First_Name":"xxxx","Last_Name":"xxxx","Username":"xxxx","Password":"xxxx","Email_Address":"xxxx@xxxx.com"},{"User_ID":2,"First_Name":"xxxx","Last_Name":"xxxx","Username":"xxxx","Password":"xxxx","Email_Address":"xxxx@xxxx.com"},{"User_ID":3,"First_Name":"xxxx","Last_Name":"xxxx","Username":"xxxx","Password":"xxxx","Email_Address":"xxxx@xxxx.com"},{"User_ID":4,"First_Name":"xxxx","Last_Name":"xxxx","Username":"xxxx","Password":"xxxx","Email_Address":"xxxx@xxxx.com"},{"User_ID":5,"First_Name":"xxxx","Last_Name":"xxxx","Username":"xxxx","Password":"xxxx","Email_Address":"xxxx@xxxx.com"}]

Viewing all articles
Browse latest Browse all 82141

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>