EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: lorwynz_11 on October 09, 2013, 08:50:41 PM



Title: Is it possible to print datagrid?
Post by: lorwynz_11 on October 09, 2013, 08:50:41 PM
Is it possible to print the data inside the datagrid and print the pop up edit form from this tutorial?
http://www.jeasyui.com/tutorial/app/crud.php (http://www.jeasyui.com/tutorial/app/crud.php)


Title: Re: Is it possible to print datagrid?
Post by: stworthy on October 09, 2013, 11:28:12 PM
There is no build-in printable functionality in datagrid plugin. The user must to achieve it himself.


Title: Re: Is it possible to print datagrid?
Post by: lorwynz_11 on October 10, 2013, 12:21:12 AM
how about export it in pdf or excel?


Title: Re: Is it possible to print datagrid?
Post by: acreonte82 on October 11, 2013, 07:30:52 AM
If you are using PHP you can use this class:
http://phpexcel.codeplex.com/

very easy to implement


Title: Re: Is it possible to print datagrid?
Post by: lorwynz_11 on October 11, 2013, 06:08:54 PM
how can I use it and connect to my datagrid?


Title: Re: Is it possible to print datagrid?
Post by: arma on October 13, 2013, 11:55:15 PM
I guess there are 2 ways i know:

1. If the data grid is editable in client side you could send the grid data to server and convert the data to excel or any printable format, otherwise you could just convert directly based on the grid query. Just put a datagrid toolbar as a link button to download the excel file.

2. Open new browser window via js (window.open) and send the grid data to the new window. I guess you could format the data as html table so it's nicer to print.