Welcome Guest, Not a member yet? Register   Sign In
Carbogrid - datagrid and CRUD
#31

[eluser]dioslaska[/eluser]
@rw1

To use your own database, you must configure it in application/config/database.php
(http://ellislab.com/codeigniter/user-gui...ation.html)

To specify which table from your database you want to display in the grid, you have to modify the controller (application/controllers/sample.php):

Code:
$params = array(
    'id' => 'users',
    'table' => 'user', // <- This is the database table
    'url' => 'sample/single',
    'uri_param' => $grid,
    'columns' => $columns,
    'commands' => $commands,
    'ajax' => TRUE
);

Please note that the documentation assumes you are familiar with CodeIgniter and MVC
#32

[eluser]Noobigniter[/eluser]
I use carbogrid with my database, and i got this in my log :
Code:
ERROR - 2012-11-03 21:09:20 --&gt; Severity: Notice  --&gt; Array to string conversion /application/modules/account/views/carbo/carbo_grid.php 42

carbo_grid.php
Code:
41.            foreach ($command as $key => $value) {
42.                $command_str .= "'" . $key . "': '" . $value . "',";
43.            }

in my controller i have this:
Code:
$commands['delete']['toolbar'] = false;
        
$params = array(
      'id' => 'users',
      'table' => 'roles',
      'url' => 'admin/single',
      'uri_param' => $grid,
      'columns' => $columns,
      //'columns_visible' => array(0,2,3,4),
      'commands' => $commands,
      'ajax' => TRUE
);
I do not know what to do, apart from disabling errors :/
#33

[eluser]Unknown[/eluser]
Is there a way to disable add/edit/delete in CarboGrid?

If so, is there any way to set it so that users can't edit, but can still pop-up the edit screen?

Basically, I'm working on an app that'll be a display-only interface to a DB, the visitors should only be able to look at data, not add/edit/delete. However, each record has too much info to display on the grid. I'd like to be able to show a limited number of fields, then have the user be able to call up the edit screen (or equivalent), which lists more of the fields (including more space for large text fields), but still not be able to edit the record.

Thanks,
Juliean
#34

[eluser]Unknown[/eluser]
Hello Guys,

I installed CarboGrid 0.9.1 and I got lots of JQuery errors depending on the version of JQuery core and Jquery UI installed and maybe the PHP also , don't know yet. So I'm asking about your config with no error. And I can't use filtering.

Please help,

Thanks Smile




Theme © iAndrew 2016 - Forum software by © MyBB