Reload datatable when ajax is custom function..?
Reload datatable when ajax is custom function..?
panste
Posts: 3Questions: 1Answers: 1
How would you reload this datatable? It has custom function for data retreiving. And tableShapes.api().ajax.reload() doesn't work. Is there any method that will do the work?
tableShapes = $('#tableShapes').dataTable({ "searching": false, "retrieve": true, "ajax": function (data, callback, settings) { promises[1].done(function (response) { response.data = Object.keys(response.data).map(function (key) { return response.data[key] }); callback(response); }).fail(function (ex) { alert("Doslo je do greske."); console.log(ex); }); }, "lengthChange": false });
This question has accepted answers - jump to:
This discussion has been closed.
Answers
ajax.reload()
should just trigger your custom function. If it isn't working, I can take a look at a test case if you link to one.Allan
It just doesn't execute my function... Sorry but how to make a test case?
Actualy It trigers my function. The probelm is in caching...
Thank you, anyway...