Error message is not displayed in Bootstrap theme list view but works fine both in flexgrid and in datatables themes, see test code:
public function employees() {
$crud = new grocery_CRUD();
$crud->set_theme('bootstrap');
$crud->set_table('employees');
$crud->callback_before_delete(array($this, 'check_before_delete'));
$crud->set_lang_string('delete_error_message', 'This data row with firstName "Karl" cannot be deleted.');
$output = $crud->render();
$this->_example_output($output);
}
function check_before_delete($primary_key) {
$this->db->select('firstName');
$query = $this->db->get_where('employees', array('employeeNumber' => $primary_key));
$row = $query->result_array()[0];
if ($row['firstName'] == 'Karl') {
return FALSE;
} else {
return TRUE;
}
}