⚠ 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

action to view detail record



tongsahi
  • profile picture
  • Member

Posted 11 May 2012 - 07:07 AM

HI
i want to add new action and Click to view detail this reord

please example the code for me becasuse i am form thailand .i can read english i little bit ^^

carlinchisart
  • profile picture
  • Member

Posted 11 May 2012 - 18:16 PM

hi, yo can use the add action method

http://www.grocerycrud.com/documentation/options_functions/add_action

askharae2
  • profile picture
  • Member

Posted 19 July 2012 - 07:38 AM

[quote name='carlinchisart' timestamp='1336760177' post='1711']
hi, yo can use the add action method

http://www.grocerycr...ions/add_action
[/quote]
thanks for your info :)

but did not function if i not use this code below :
[color=#0000ff]$crud[/color]->[color=#006600]set_theme[/color][color=#66cc66]([/color][color=#ff0000]'datatables'[/color][color=#66cc66])[/color];

can you explain to me?

noskov.biz
  • profile picture
  • Member

Posted 19 July 2012 - 09:26 AM

Hi, askharae2 and welcome to the forum!

Please, show us your function where you try to use add_action().

fdias
  • profile picture
  • Member

Posted 19 July 2012 - 13:43 PM

It works on flexigrid, I've tested it myself.
What GC version are you using? And CI version?

Cheer.s

tofayelahmed
  • profile picture
  • Member

Posted 24 July 2012 - 04:58 AM

I use GC 1.2 version.
The add_action not working in my flexigrid theme,but working the datatables theme.
My code is below:

$this->grocery_crud->set_table('nlg_emp_info');
$this->grocery_crud->set_subject('Member');
$this->grocery_crud->set_relation('religion','religion','religion_name');
$this->grocery_crud->set_relation('gender','genders','gender_name');
$this->grocery_crud->set_relation('marital_status','marital_sts','marital_status');
$this->grocery_crud->set_relation('blood_group','blood_group','blood_group_name');
$this->grocery_crud->set_relation('designation','designation','designation_name');
$this->grocery_crud->set_relation('department','department','dept_name');
$this->grocery_crud->set_relation('place_of_birth','district','district_name');
$this->grocery_crud->change_field_type('user','invisible');
$this->grocery_crud->callback_before_insert(array($this,'user_calback'));
$this->grocery_crud->add_action('More', '', 'demo/action_more','ui-icon-plus');
$this->grocery_crud->set_field_upload('image','emp_img/');

$output = $this->grocery_crud->render();
$this->crud_output($output);


noskov.biz
  • profile picture
  • Member

Posted 24 July 2012 - 05:09 AM

Hi, tofayelahmed!

add_action() works for you well, I think. But you do not see the button (or some icon). Please, check documentation of add_action() function. It says that 2 parameter is "[color=#2C575B][font=Arial, Tahoma, Helvetica, sans-serif]add an image url . Notice that [b]in the flexigrid theme is a required field[/b].[/font][/color]"