⚠ In case you've missed it we are migrating 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 forum is read-only and soon will be archived. ⚠


setActionButton

setActionButton ActionButton Button

  • Please log in to reply
7 replies to this topic

#1 indra

indra

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 11 September 2019 - 09:23 AM

Hi i new here

Can anyone explain about setActionButton and giveme some example?



#2 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 200 posts

Posted 12 September 2019 - 05:31 AM

Hi i new here

Can anyone explain about setActionButton and giveme some example?

 

Hello there Indra!

 

Explanation and example is located in this link: https://www.groceryc...etActionButton/

I hope this helps.

:)



#3 indra

indra

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 13 September 2019 - 06:28 AM

tnks i have tried it 

can you give me another example (another function) ?
 



#4 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 200 posts

Posted 14 September 2019 - 12:07 AM

tnks i have tried it 

can you give me another example (another function) ?
 

 

What do you intend it would do?



#5 indra

indra

    Newbie

  • Members
  • Pip
  • 7 posts

Posted 14 September 2019 - 03:06 AM

i try my action button for execute function and it don't work



#6 larasmith

larasmith

    Advanced Member

  • Members
  • PipPipPip
  • 200 posts

Posted 15 September 2019 - 08:37 AM

i try my action button for execute function and it don't work

 

I mean what does your function suppose to do?



#7 matiasnabarro@gmail.com

matiasnabarro@gmail.com

    Newbie

  • Members
  • Pip
  • 5 posts

Posted 19 March 2020 - 02:19 AM

Hi! I know this thread is a little bit old but maybe you can help me. I'm migrating an application in GC3 from community version to enterprise. I can't get the actions to work. As an example:

 

this worked with community version.  
     $crud->add_action('Personal & Equipos','','operaciones/personal_equipos_detalle','','');

Also this neither works anymore

      $crud->callback_column('monto',array($this,'_callback_monto'));
(The callback function)
function _callback_monto($value, $row)
{
$total= $row->monto_transporte+
$row->monto_servicios+
$row->monto_materiales;


return '<div class="font-weight-bold">'.$total.'</div>';
}

One more issue is that I add the "Monto" column, referenced in the callback_column, the grid does not finish to load, I get an error. I think I can't use columns other than those who come from the db or model. Is that right?.

Thanks in advance.



#8 egsolis

egsolis

    Newbie

  • Members
  • Pip
  • 9 posts

Posted 03 July 2020 - 07:29 PM

I migrate from

 

 $crud->add_action('PDF', '', 'pdfs/displayPDF/1/1','ui-icon-plus');    
               
 
to
           
 
$crud->setActionButton('PDF', 'ui-icon-plus',  function ($row) {
return site_url('pdfs/displayPDF/1/1').'/'.$row->carta_id;
}, true);

 

 

Hope this is helpful







Also tagged with one or more of these keywords: setActionButton, ActionButton, Button

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users