jQuery ajax data table is sending the parameters for filters as following array How to change it send actual value and name of column?
Parameters: {
"draw"=>"2",
"columns"=>"[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]", "order"=>"[object Object]",
"start"=>"0",
"length"=>"10",
"search"=>"[object Object]"
}
Add fnServerData in your Datatable config.
"fnServerData": function (sSource, aoData, fnCallback, oSettings) {
$.ajax({
"dataType": 'json',
"type": "GET",
"url": "/Home/AjaxGetJsonData",
"data": oSettings.oAjaxData,
"Content-Type": "application/json",
"success": function (json) {
fnCallback(json);
}
});
}
The same issue for me. I figured out that the reason was my past setting of jquery jQuery.ajaxSettings.traditional = true. Remove this setting works for me
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With