Get Free Trial

How to select a row and export only selected rows

Subramanian asked on April 12, 2021

Hello Team,
I wanted to select multiple rows and the same want to export only the selected items will that be possible?

3 answers

Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 12, 2021

Thank you for reaching out to us.
Flexmonster only supports exporting the whole slice displayed on the grid. Currently, we do not have plans to release partial export.
Still, we suggest considering the following workaround that may be useful for your case.
You can add an item to the context menu that would control the exporting process. After choosing this option, Flexmonster will pass all the information about cells and their positions to the handler. This information can be used to create a temporary Flexmonster instance and populate it with the selected data. Next, export from the created instance and dispose it afterward.
We have prepared the JSFiddle demonstrating what exact data is returned to the handler: It is represented as an array of Cell Data Objects which contain information about the cell.
Below you can find a brief sum-up with an expected scenario:

  1. Customize the context menu by adding the “Export” tab. See our context menu customization guide for reference:
  2. Create a corresponding handler of the “Export” tab that would receive an array of Cell Data Objects.
  3. Parse the received array of Cell Data Objects and compose an interim dataset for the new Flexmonster instance.
  4. Create Flexmonster instance on the page and populate it with inline JSON data prepared earlier.
  5. Perform exporting using the exportTo API call.
  6. Dispose the created instance after the exportcomplete event is fired.

Please let us know if it helps.
Kind regards,

Subramanian April 13, 2021

Thanks for the clarification!
Is there a way to select a row by clicking the cell numbers, (ctrl + click) for multiple selections?

Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 14, 2021

Thank you for your feedback.
Concerning the selection, if we understand correctly, the requirement is to select multiple rows/columns by clicking on their headers (cells containing indexes). If so, we want to draw your attention to that this selection serves only to highlight one row/column. It does not select cells. Instead, it highlights the chosen part of the grid for convenient browsing.
You can select cells one by one using ctrl + click combination or a rectangular grid’s part using multi-selection.
Do not hesitate to contact us if additional questions arise.
Kind regards,

Please login or Register to Submit Answer