Reloading data tables after a record deletion
Reloading data tables after a record deletion

Hi, I have a project I am working which has a Bootstrap Modal popup (Modal 1) which in turn display records using dataTables. this works fine. On the same page I have a tabbed menu (Tab 2) and one of the tabs also displays the same data as the Modal popup.
If a record is selected from the tabbed list another modal pops up allowing editing or deletion of the record. If I delete the record the tabbed menu item is refreshed and the record is not displayed (deleted).
If I then open modal 1 the deleted record is still displayed, it only gets removed from the record list if I refresh the page. I have an Ajax process that deletes the record and in the success: function I have the following code
success: function(data){
$('#WayFinderStatusTable').DataTable().ajax.reload(); // Reloads the main Tab data
$('#wayfinderSignageTableTab').DataTable().ajax.reload(); //Reloads the Tab 2
$('#wayfinderSignageTable').DataTable().ajax.reload(); Should reload the Modal 1 data.
}
At the point of the record deletion the Modal 1 is hidden.
Should this work or am I going about this wrong.
Many thanks in advance for your help and time
Answers
It sounds like it should work? Is this using Editor? We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Hi Colin and many thanks for your response. I have now found that the script is working and why the data is not clearing form the modal window. It appears that the first time the modal is opened the data is displayed. When it's deleted and the modal windows is closed and then reopened using the same button the ajax call is not executing on the second button click. Below is the code I am using and I suspect it's something I have over looked in my code.
The Button:
The Modal window:
The dataTables and Ajax call
As I said, we're happy to look, but please link to a test case.
Colin