Hi,
I have 2 tables - questions and answers.
Before deleting questions I want to check that all answers have been deleted so I have a callback_before_delete function like this
function _delete_callback($primary_key = null) { $count_answers = $this->faqs_model->count_answers($primary_key); if ($count_answers > 0){ $this->session->set_flashdata('action', 'Warning: There are answers associated with this question. You must delete the answers before deleting the question.<br />No action has been taken.'); return false; }
So if there are answers ($count_answers is > 0) we return false , GC does not delete and shows the red "records not deleted" message but it does not reload the grid (using flexigrid) so the flashdata message is not displayed until the user refreshes the page.
Is there any way I can get the page to refresh so that the user knows why the delete did not happen?
Thanks
Richard