Datatables ajax reload with updated data to ajax call
Datatables ajax reload with updated data to ajax call
morganrob
Posts: 18Questions: 7Answers: 2
I have an ajax-sourced datatable where the ajax call requires data which works fine:
var curCust = { customer: "TEST", refNo: "D" };
var pickup = $("#pickup").DataTable({
ajax: {url:"api/pickups/", dataSrc:'', data:curCust},
columns: ....
Now, how do I reload that with new request data? I believe once the datatable is created the ajax:{data: is fixed, and
pickup.ajax.reload();
doesn't reflect the current values in my curCust object. What am I missing?
Thanks, Rob
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Nevermind!
Thanks for posting back - good to hear you have it working now!
Allan
Very useful indeed...
Thanks!