I'm trying to use server-side data loading to fill the table. My view is:
The result is:
The output Json which controller returns is:
What is wrong in my code?
I was worried that the columnDefs after columns would cause an issue, but as you can see here, that's fine. Everything looks like it should work, though this thread may be an issue if you have backslashes in your returned data.
If that doesn't help, could you link to your page so we can debug please,
Your columns array is inside the ajax object, which is going to be at least part of the issue.
Also you'll need to use ajax.dataSrc set to an empty string to tell DataTables to expect a plain array of data, rather than being wrapped in an object.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.