Print button for dataGrid?

I would need to have a Print button next to each grid in order to let users print the grid content easily. Is there any way how to do it similarly to Export?
2 answers

A print stylesheet could be used to style the data grid for printing by for example hiding the search and control bar, and wrapping text in the data grid cells on multiple lines. For the print button a widget could be created which makes sure only the data grid to be printed is visible (for example by adding a css class defined in the print style sheet) and offers the user to print the document. Another approach for the widget would be to copy the data grid to be printed to a new document, where a separate (print) style sheet can be applied.

Of course the print button should know which data grid to print, which can be accomplished by adding a special class to the data grid which is also configured on the print button.


Two approaches:

  • if no special formatting of the data is needed, users could export to Excel and then print the excel file
  • if formatting is required, build a document template that formats the objects in the datagrid as necessary. Create a microflow that accepts a list of the objects from the data grid as a parameter and uses these objects to generate a file based on the document template. Finally download that document, which the user can print

Maybe one of these is workable for you.