In grocery crud, searching is not happening for related tables.
Searching is only happening for that table fields.
function index() {
$crud = new grocery_CRUD();
$crud->set_theme('flexigrid');
$crud->set_table('table_name');
$crud->display_as('id','Name');
$crud->callback_column('id', array($this, 'changeName'));
$output = $crud->render();
}
function changeName($value, $row) {
$new = $this->db->select('name')->where('another_table.id', $row->id)->get('another_table')->result();
if(!empty($new)){
return $new[0]->name;
} else {
return $value;
}
}
Here search is not happening for name.
Any one have solution for this ?
Thanks in advance.