⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

refreshing the table after a callback before delete



richb201
  • profile picture
  • Member

Posted 10 February 2018 - 02:31 AM

I am using a callback after as user presses the automatic delete button by using this. 

 

$crud->callback_before_delete(array($this,'delete_campaign'));

 

I do this because I need to clean up some other tables at the same time. What I am finding is that the callback_before_delete is "escaping" the normal redrawing of the CRUD. I can of course just press "reload this page" on the browser and it draws correctly with the record I deleted being removed. But I'd like to get the CRUD to redraw without the user having to re-load. How can I do this at the bottom of my delete_campaign callback? 

 

thx


Amit Shah
  • profile picture
  • Member

Posted 19 February 2018 - 03:52 AM

well it seems that the delete button itself is an ajax call .. and is expecting some result / output from the call .. now you got a callback - if for some reason you don't return true - it might be registering itself as error - or - there might be some content echoed that might not be giving in the desired result - that is the reason you might not be getting a auto-reload of the page. My experience - once a record gets deleted - it automatically removes the record .. also reload the stuff silently and shoots up on the screen a message for the confirmation.

 

 

Check in the debug console if there is any JS error .. or something that might be causing this to happen.

 

Hope this helps u find your issues ..

 

Happy GCing: )