1

I have code like this

$crud->columns('a','b','c','d');
$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();

Now a,b,c,d s 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?

4

2 回答 2

1

做就是了:

$crud->unset_add();
$crud->unset_edit();
$crud->unset_delete();

没有$crud->columns它,它应该按预期为您工作。

顺便说一句,您可以改用:

$crud->unset_operations(); //This is a shortcut to undet_add/edit/delete

有关更多信息,您可以查看:http ://www.grocerycrud.com/documentation/options_functions/unset_operations

于 2013-06-08T10:24:49.393 回答
1

您可以显示表格中的所有列$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);    
}
于 2013-06-08T10:28:27.850 回答