⚠ 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

setActionButton



indra
  • profile picture
  • Member

Posted 11 September 2019 - 09:23 AM

Hi i new here

Can anyone explain about setActionButton and giveme some example?


larasmith
  • profile picture
  • Member

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.grocerycrud.com/enterprise/api-and-function-list/setActionButton/

I hope this helps.

:)


indra
  • profile picture
  • Member

Posted 13 September 2019 - 06:28 AM

tnks i have tried it 

can you give me another example (another function) ?
 


larasmith
  • profile picture
  • Member

Posted 14 September 2019 - 00:07 AM

tnks i have tried it 

can you give me another example (another function) ?
 

 

What do you intend it would do?


indra
  • profile picture
  • Member

Posted 14 September 2019 - 03:06 AM

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


larasmith
  • profile picture
  • Member

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?


matiasnabarro@gmail.com
  • profile picture
  • Member

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.


egsolis
  • profile picture
  • Member

Posted 03 July 2020 - 19: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