This is my response from action method:
{
"draw": 1, "recordsTotal": 2, "recordsFiltered": 2, "data": [
{ "ISIN": "IMF284L016", "SubSchemeName": "Geliance jocused Marge Map Plan-Growth Option", "TotalAmountInvested": 400.0000, "CurrentValue": 507.402400, "Client": "23", "ClientName": "Lweta Kain " },
{ "ISIN": "IKF24K01o", "SubSchemeName": "", "TotalAmountInvested": 0.0000, "CurrentValue": 0.000000, "Client": "23", "ClientName": "Uweta Kain " }
]
}
Below is my code
$('#orderBookTable').DataTable({
"pageLength": 50,
"bProcessing": true,
"bServerSide": true,
"ajax": {
"url": "/Fund/Get",
"type": "POST",
"datatype": "Json",
"data": function (d) {
d.clientCode = $("#sltClientName").val();
},
"columns": [
{ "data": "SchemeName" },
{ "data": "Client" },
{ "data": "Invested" },
{ "data": "CurrentValue" },
{ "data": "CurrentValue" },
],
"fnCreatedRow": function (d) {
debugger;
}
}
});
please have look in to it. My server side code returning JsonResult using Json method