| 
			| 
					
						| jega | 
								|  | «  on: May 04, 2018, 07:14:04 AM » |  | 
 
 HI.
 I'm a very happy user of easyui. Today i got an advertising of jqwidget, and was looking at it. EasyUI and jqWidget can do many of the same things but also some different things.
 
 One thing that i find very nice is the feature in jqxgrid. Data export and data printing.
 
 I think that a lot of people will love these features.
 
 Any chance for that in easyui ?? Or when ?? ;-)
 
 Regards
 Jesper
 
 |  
						| 
								|  |  
								| « Last Edit: May 13, 2018, 12:46:16 PM by jega » |  Logged | 
 |  |  | 
	| 
			| 
					
						| Alfred 
								Full Member    
								Posts: 134
								
								 
								-Licensed User-
								
								
								
								
								
								   | 
								|  | « Reply #1 on: May 04, 2018, 07:31:26 AM » |  | 
 
 It would be nice if Easyui could integrate the same. I am using MPDF for PDF, PHPExcel for Excel and for chart, HighChart. So I depend a lot on third party library.  |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jarry | 
								|  | « Reply #2 on: May 06, 2018, 01:32:39 AM » |  | 
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jega | 
								|  | « Reply #3 on: May 06, 2018, 01:04:05 PM » |  | 
 
 Hi Jarry
 Thanks for the code
 
 Printing works fine, but export to excel fails.
 
 Error description
 SCRIPT122: Det dataområde, der blev sendt til et systemkald, er for småt.
 (In English: The dataarea which is send to a systemcall, is too small)
 
 Error in line 59
 alink[0].click();
 
 Tried different things, but can't get it to work
 
 Jesper
 
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jarry | 
								|  | « Reply #4 on: May 06, 2018, 06:56:40 PM » |  | 
 
 The IE has the url length limit. Please re-download the 'datagrid-export.js' file to fix this issue. |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jega | 
								|  | « Reply #5 on: May 06, 2018, 10:48:23 PM » |  | 
 
 Hi Jarry
 This works.
 
 BUT. Then i had a problem with Danish charset.
 
 Added <meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"> before <head> and i now have Danish in the excel file
 
 What about toCSV and toPDF ;-)
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| thecyberzone | 
								|  | « Reply #6 on: May 07, 2018, 01:58:00 AM » |  | 
 
 And what about Convert2PDF   |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jarry | 
								|  | « Reply #7 on: May 08, 2018, 01:05:04 AM » |  | 
 
 Call the 'toArray' method to get the array data and use the pdfmake library to create the pdf. var body = $('#dg').datagrid('toArray');var docDefinition = {
 content: [{
 table: {
 headerRows: 1,
 widths: ['*','*','*','*','auto','*'],
 body: body
 }
 }]
 };
 pdfMake.createPdf(docDefinition).open();
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jega | 
								|  | « Reply #8 on: May 08, 2018, 11:51:38 PM » |  | 
 
 Hi Jarry Have no method toArray   |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jarry | 
								|  | « Reply #9 on: May 09, 2018, 06:14:23 PM » |  | 
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| proceno72 
								Newbie  
								Posts: 39
								
								   | 
								|  | « Reply #10 on: May 09, 2018, 11:39:31 PM » |  | 
 
 Wow, I've been waiting for a while this kind of extension. When it will be "official" and then documented? As I wrote on ather post, it could be a good practice on extensions site pages to show a changelog, a version number or at least a "last modified date". It's very difficult for me realize if I'm using the latest version of any extension |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| Pierre | 
								|  | « Reply #11 on: May 09, 2018, 11:42:16 PM » |  | 
 
 Jarry, this is awesome, thank you for your work.    |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jega | 
								|  | « Reply #12 on: May 10, 2018, 01:22:24 AM » |  | 
 
 Downloaded the new version.
 On calling var body = $('#dg').datagrid('toArray'); i get this error
 
 SCRIPT438: The object does not support the feature or method 'toArray'
 jquery.easyui.min.js (11055,1)
 
 jquery.easyui.min.js is version 1.5.5.1
 
 Same problem on two different IIS servers
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jarry | 
								|  | « Reply #13 on: May 10, 2018, 02:52:01 AM » |  | 
 
 |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	| 
			| 
					
						| jega | 
								|  | « Reply #14 on: May 10, 2018, 05:38:47 AM » |  | 
 
 Hi Jarry The sample works fine yes, but i have the same code, and mine fails. What i found was, that i do not have the function toArray() in datagrid-export.js When i download the newest zip file, i still get an zip file with an old version. Maybe a cache problem. Downloaded the file from https://www.jeasyui.com/easyui/datagrid-export.js  instead, and now i have a datagrid-export.js with the toArray function, and everything works. Jesper |  
						| 
								|  |  
								|  |  Logged | 
 |  |  | 
	|  |