118
Views
4
Comments
[OutSystems Data Grid] Export Only Selected Rows
outsystems-data-grid
Reactive icon
Forge asset by OutSystems
Application Type
Reactive

Hello,

I have one export button on click of that I want to export only selected rows into the excel. And also only visible column should get exported.

Can you guys please guide me for the same.


Regards,

Shrinjala


2022-04-08 16-49-21
José Rio

Hi @Shrinjala Singh,

This is not an implemented feature, in fact this is even not implemented by wijmo (DatGird library), as you can see at their Export Demo page.
It's indeed an available feature if you're exporting into a PDF document as you can check here, still an unavailable feature at DataGrid.

That said, I'm afraid we can't help you with the export to excel.
Let us know if exporting into a PDF could be a solution, and we'll help you with that.

Cheers,
JR

2020-12-07 13-51-26
Shrinjala Singh

Hi @José 

How to achieve into Pdf.

2022-04-08 16-49-21
José Rio

Hi @Shrinjala Singh,

After some exploratory tests DataGrid do not contains the necessary feature imported in order to help with the export into PDF, which I should notice before mentioned we were able to help you with it, so let me sorry for that.

That said and due licence rules we can not share JS files from the wijmo repository outside of the DataGrid context which block me to share a workaround. 

Currently, we have other priorities that we will focus on first, but we will keep an eye to revisit it later.

Sorry for not be able to help you this time.

Cheers,
JR.

2021-03-18 21-03-15
Benjith Sam
 
MVP

Hi Shrinjala,

For the mentioned use case, I have two approaches to suggest as a solution.

Approach 1: With the custom JS code, capture the selected row and use the JSON deserialize and RecordListToExcel (in-built feature) to export the excel with the selected row data

Approach 2: With the custom JS code, capture the selected row and use the ConvertJSONToXL client action defined in the Excel translator forge component to export the excel with the selected row data

  • Approach 2 doesn't require a custom structure to be defined. 

Demo screen: DG_ExportXL | export only selected rows into the excel

Note: You will have to select the entire Grid row to make it work.

Refer to the attached oml.

I hope this helps you!


Kind regards,

Benjith Sam

DataGrid_XL_ExportTask.oml
Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.