This post deals with adding filters to a grid so that you can filter the result set. The reason for this is that you might have large grids (eg 100 000 items) and you dont necessarily want to search through all that info to get to the row you want to view/edit
$filter = new datafilter_library(); $filter->label = 'User Filter'; $filter->db->select('user.*, customer.company_name, customer.trading_entity_type_id'); $filter->db->from('user'); $filter->db->join('customer', 'user.customer_id = customer.customer_id'); $filter->field('dropdown', 'trading_entity_type_id', 'Trading Entity Type') ->options(array('1'=>'Associate', '2'=>'Wholesaler', '3'=>'Retailer')); $filter->field('input','company_name','Company Name');//->attributes(array('style' => 'width:170px')); $filter->field('input','user_name','User Name'); $filter->field('input','user_idnumber','ID Number'); $filter->field('input','email','email'); $filter->buttons('reset','search'); $filter->build(); $grid = new datagrid_library(); $grid->label = $this->title; $grid->source($filter); $grid->column('company_name','company'); |
Notice that the grid is no longer linked to a query, but is linked to the filter.

Categories
Tag Cloud
Blog RSS
Comments RSS
Last 50 Posts
Back
Void « Default
Life
Earth
Wind
Water
Fire
Light 
Hi, today I downloaded rapyd 0.7 and made it run on C:/xampp/htdocs/rapyd using the .htaccess from CodeIgniter’s user_guide. With this skipping over “index.php” I can arrive “http://localhost/rapyd/demo” but as a result of some analysis, rapyd does not get the “rapyd/rapyd/assets/raypd.css”, nor does it get the “rapyd/modules/demo/assets/*.png” images. – Do you have any ideas, why this could be? – Yours, Micha
you’ll have to check your paths and config files. I had quite a hassle getting rapyd running with CI. In fact, I’ve done a lot of hacking in rapyd itself to make it play nicely with CI