⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Incorrect table info showing up



DRKgatsby
  • profile picture
  • Member

Posted 12 July 2012 - 20:11 PM

I have found an issue where the wrong amount of pages and items in the table shows up.

Here is an example:

[attachment=220:sample-error.png]

I was wondering if there was a way to auto-refresh the table on the initial loading of the table.

Thanks

fdias
  • profile picture
  • Member

Posted 13 July 2012 - 17:40 PM

Can you explain a littler futher?

The pages are correct, then number of items displayed are wrong though, as you have 4 items and not 10.

Did you change anything on the code code? What version of GC are you using?

DRKgatsby
  • profile picture
  • Member

Posted 17 July 2012 - 14:10 PM

I'm using GC 1.1.8 with CodeIgniter 2.1.0. I didn't change anything in the code. The only difference is that they are in iframes since it was the only way to get multiple tables on the same page.

This is my code:
[php] function crud_loc_equip($location_id) {
$crud = new grocery_CRUD(); $crud->set_table('location_equipment');
$crud->set_model('loc_equip_crud_model');
$crud->columns('name','item_number','serial_number','description','account_number','install_date','service_contract','status');
$crud->display_as('name','Manufacturer');
$crud->display_as('item_number','Item Number');
$crud->display_as('serial_number','Serial Number');
$crud->display_as('description','Name');
$crud->display_as('account_number','Account Number');
$crud->display_as('install_date','Install Date');
$crud->display_as('service_contract','Service Contract');
$this->db->where('location_equipment.location_id',$location_id);
$crud->unset_operations();
$output = $crud->render();
$this->_example_output($output); }[/php]

[php]<iframe id="myframe2" src="<?php echo site_url('location/crud_loc_equip/' . $location_id);?>" scrolling="yes" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:visible; width:100%; display:none"></iframe>[/php]

fdias
  • profile picture
  • Member

Posted 17 July 2012 - 20:56 PM

I suggest you update to GC 1.2.3 and CI 2.1.2 and test. A lot has been fixed on both GC and CI...

noskov.biz
  • profile picture
  • Member

Posted 17 July 2012 - 21:13 PM

Hi, my friends!
[color=#5A5A5A][font=helvetica, arial, sans-serif][size=4]DRKgatsby, [/size][/font][/color]also look at this topic about the work that have made [color=#328586][font=helvetica, arial, sans-serif]Xrymz[/font][/color].