⚠ 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

Add print action in list view or on read page



Nitin Thokare

Nitin Thokare
  • profile picture
  • Member

Posted 27 May 2014 - 08:34 AM

I'm a new user of GC and can't really understand in depth use of callback actions.

 

Can anybody answer the question at following link?

 

http://stackoverflow.com/questions/23883431/grocery-crud-add-print-action-to-each-record-in-list-or-on-read-page

 

Basically I want to add print action to each record (row) in a list view (table)...


Amit Shah

Amit Shah
  • profile picture
  • Member

Posted 27 May 2014 - 13:24 PM

Hi Nitin Thokare

 

well there's simple solution to your issue...

GC have add_action - http://www.grocerycrud.com/documentation/options_functions/add_action

here if u can give your url that will print the row.. if its simple .. u can just say $crud->add_action('print', 'path_to_icon', 'controller_name/print');

it will add id to the url automatically.

if in case you want to have a custom url - u can have take advantage of url_callback

 

As for the print button in the view / read ...

u need to add the same and its base functionality in the gc template (for ex. flexigrid) .. which ever u prefer for the same.


kat

kat
  • profile picture
  • Member

Posted 17 January 2018 - 09:18 AM

hi Nitin Thokare Amit Shah do you find the solution of your problem i want to do the same thing