Re-Post serverside without reloading table
Re-Post serverside without reloading table
I've wired up an endpoint serverside that both hands off data to the table during load as well as return a file if exporting csv. I need a reminder how to send a POST to the server without re-drawing the table. table.ajax.reload() does what I need but it reloads the table and generates an error, since I'm feeding back a file instead of the JsonResult the table needs. I want the export to mirror the same filter / order settings involved with a normal paginated api / serverside set up, I just need the table to stay put when someone hits my export button.
Thanks!
Answers
Sounds like you want to make an Ajax call but not through DataTables.
jQuery.ajax
could be used, or the newerfetch
API.If you need to know the parameters that DataTables sends to the server (so your script can do things like sorting and filtering) use the
ajax.params()
method.Allan
That's exactly it, thank you Allan!