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

[eluser]dioslaska[/eluser]
@johnwbaxter:

You can maybe use the selected_ids parameter (I think it's not yet in the docs):

Code:
$selected_ids = array(2,5,18);

$params = array(
            'id' => 'users',
            'table' => 'user',
            'url' => 'sample/single',
            'uri_param' => $grid,
            'columns' => $columns,
            'commands' => $commands,
            'ajax' => TRUE,
            'selected_ids' => $selected_ids
        );

        $this->load->library('carbogrid', $params);

This way the grid renders the rows as selected.

But be aware that you have to implement the maintenance of the $selected_ids variable used above.
My idea would be, to catch the checkbox change event on client side with jQuery and do an ajax request which adds/removes the id from the $selected_ids array. And store the array in the session maybe.


Messages In This Thread
Carbogrid - datagrid and CRUD - by El Forum - 07-09-2010, 05:44 AM
Carbogrid - datagrid and CRUD - by El Forum - 07-11-2010, 07:03 AM
Carbogrid - datagrid and CRUD - by El Forum - 07-11-2010, 10:54 AM
Carbogrid - datagrid and CRUD - by El Forum - 07-11-2010, 11:52 PM
Carbogrid - datagrid and CRUD - by El Forum - 07-12-2010, 02:56 AM
Carbogrid - datagrid and CRUD - by El Forum - 07-12-2010, 05:20 AM
Carbogrid - datagrid and CRUD - by El Forum - 07-12-2010, 03:41 PM
Carbogrid - datagrid and CRUD - by El Forum - 07-12-2010, 11:32 PM
Carbogrid - datagrid and CRUD - by El Forum - 07-23-2010, 12:16 PM
Carbogrid - datagrid and CRUD - by El Forum - 10-01-2010, 10:45 AM
Carbogrid - datagrid and CRUD - by El Forum - 10-25-2010, 09:55 AM
Carbogrid - datagrid and CRUD - by El Forum - 03-22-2011, 02:20 PM
Carbogrid - datagrid and CRUD - by El Forum - 03-22-2011, 08:25 PM
Carbogrid - datagrid and CRUD - by El Forum - 03-29-2011, 12:37 AM
Carbogrid - datagrid and CRUD - by El Forum - 03-31-2011, 11:50 PM
Carbogrid - datagrid and CRUD - by El Forum - 01-24-2012, 12:33 AM
Carbogrid - datagrid and CRUD - by El Forum - 03-06-2012, 03:17 AM
Carbogrid - datagrid and CRUD - by El Forum - 03-06-2012, 11:32 PM
Carbogrid - datagrid and CRUD - by El Forum - 03-16-2012, 12:37 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-11-2012, 06:42 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-14-2012, 07:03 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-15-2012, 04:07 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-18-2012, 11:37 PM
Carbogrid - datagrid and CRUD - by El Forum - 09-19-2012, 01:33 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-19-2012, 01:43 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-19-2012, 02:04 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-19-2012, 02:10 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-19-2012, 02:22 AM
Carbogrid - datagrid and CRUD - by El Forum - 09-20-2012, 10:42 PM
Carbogrid - datagrid and CRUD - by El Forum - 09-21-2012, 12:02 AM
Carbogrid - datagrid and CRUD - by El Forum - 10-17-2012, 03:09 AM
Carbogrid - datagrid and CRUD - by El Forum - 11-03-2012, 02:30 PM
Carbogrid - datagrid and CRUD - by El Forum - 02-14-2013, 12:04 PM
Carbogrid - datagrid and CRUD - by El Forum - 07-16-2014, 11:47 AM



Theme © iAndrew 2016 - Forum software by © MyBB