jQWidgets Forums
jQuery UI Widgets › Forums › React › While exporting jqxGrid need to add data
Tagged: grid data export
This topic contains 3 replies, has 2 voices, and was last updated by svetoslav_borislavov 1 year, 7 months ago.
-
Author
-
I need a header and/or footer or some other way to add data e.g. timestamp, user, filters applied etc. when exporting data from a react version of the grid control. Is it possible?
Hi,
Sorry, the only supported options for exporting the grid are the following:
The first parameter of the export method determines the export’s type – ‘xls’, ‘xml’, ‘html’, ‘json’, ‘pdf’, ‘tsv’ or ‘csv’.
The second parameter is the file’s name. If you don’t provide a file name, the Grid will export the data to a local variable.
For example:
var data = $(“#jqxgrid”).jqxGrid(‘exportdata’, ‘json’);The third parameter is optional and determines whether to export the column’s header or not. Acceptable values are – true and false. By default, the exporter exports the columns header.
The fourth parameter is optional and determines the array of rows to be exported. By default all rows are exported. Set null, if you want all rows to be exported.
The fifth parameter is optional and determines whether to export hidden columns. Acceptable values are – true and false. By default, the exporter does not export the hidden columns.
The sixth parameter is optional and determines the url of the export server. By default, the exporter is hosted on a jQWidgets server.
The last parameter is optional and determines the char set.Parameter Type
dataType String
fileName(optional) String
exportHeader Boolean
rows Array
exportHiddenColumns Boolean
serverURL String
charSet StringBest regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/thanks you for the info! Just to clarify:
* we are planning on using either a Restful API or synchronize API responses data to Oracle DB and read it from there to populate the grid (including pagination). The API or sql query will return a page of data at a time. On export will we be able to get entire data set and export it or is it for local data loaded into the grid only? Could you point me to an example of getting all the data for an export?
* “The sixth parameter is optional and determines the url of the export server.” Are there instructions for setting up an export server?Thanks!
Hi,
When you download jqwidgets from the portal, in the zip, there is dataexport.php file.
You should put this file on your server and pass the url as the sixth argument in the exportdata functionBest regards,
Svetoslav BorislavovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.