jQWidgets Forums
jQuery UI Widgets › Forums › DataTable › 'exportdata' to HTML in jqxDataTable
Tagged: exportdata html jqxDataTable
This topic contains 9 replies, has 3 voices, and was last updated by sandeep-damco 9 years, 3 months ago.
-
Author
-
Hello.
I’m testing the method ‘exportdata’ with the parameter ‘html’ in a jqxDataTable to assign it to a variable and not working properly:
var htmlCode = $ (“#TableWithData”).jqxDataTable(‘exportdata’, ‘html’);
The variable ‘htmlCode’ has the value ‘undefined’ and the browser tells me to download a HTML file. If I tell you open it, it displays the table.
I think it may be a bug, but the method ‘exportdata’ of the jqxDataTable not in the API’s, but it’s in the demo.
A greeting and thanks.
Josep Peña
Hi Josep Peña,
As far as I know, the DataTable widget does not have the feature to export to a local variable.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter.
I assumed that this is possible why it is in Demo in jqxDataTable in http://www.jqwidgets.com web: Data printing example.
http://www.jqwidgets.com -> Demo -> jqxDataTable -> Data printing -> View Source.
Best regards,
Josep Peña
Hi Josep Peña,
If that is so, then you can use the same approach as in this sample which seems to work and give the html data in a local variable. I am sorry, I must have missed that.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHello Peter.
I found what the problem was. In ‘jqxDataTable’ have to put in the ‘exportSettings’ property value ‘fileName’ to ‘null’:
exportSettings: { fileName: null }
The problem is that as it is not in the API had not noticed.
Thank you very much for your help.
Greetings.
Josep Peña
Hi Josep Peña,
Thank you for the feedback. We appreciate it and will do our best to update the public API as soon as possible.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
I have also same issue.when you enter these setting “exportSettings: { fileName: null }” than export to excel is not working.
So Either print or export to excel is working in jqxDatatable. Both are not working at once
Hi sandeep-damco,
When fileName is null, the export is to a variable not to Excel. If you want to export to excel, don’t change exportSettings and look at our online demo which exports data to excel and any of the other supported formats.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi Peter,
But i want both print and export to excel on one page that is not working.
Can you any example link in which both print and export to excel in DataTable is working on one page.Regards
Sandeep PruthiHi Peter,
Keyboard Navigation is not working with checkbox selection mode in jqgrid.Kindly help.Regards
Sandeep Pruthi -
AuthorPosts
You must be logged in to reply to this topic.