I have code like this
$crud->columns('a','b','c','d');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
Now a,b,c,ds are showing in grid. But total 20 field in table. So it is not possible to show all field in grid.How can i show all data in grocery crud?
Just do:
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
WITHOUT the $crud->columns
and it should work for you as expected.
By the way you can use instead:
$crud->unset_operations(); //This is a shortcut to undet_add/edit/delete
for more you can check: http://www.grocerycrud.com/documentation/options_functions/unset_operations
You can show all columns from the table $crud->set_table('table_name');
public function employees_example()
{
$crud = new grocery_CRUD();
$crud->set_table('employees');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();
$output = $crud->render();
$this->_example_output($output);
}
function _example_output($output = null)
{
$this->load->view('our_template.php',$output);
}
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.