Export wijmo flex grid to an image

Posted by: eric.linder on 6 December 2017, 5:59 pm EST

    • Post Options:
    • Link

    Posted 6 December 2017, 5:59 pm EST

    Hi,

    We need to export the wijmo flex grid to an image (jpg or png or else). On button click, the grid is export to the image and asked the user to save it on the disk. How we achieve the goal? Any small sample application would be appreciated.

    Thanks

  • Posted 7 December 2017, 1:02 am EST

    Hi Eric,

    Could you please let us know the number of rows and columns to export as PNG from FlexGrid. This would not be so easy if you have larger number of cells in Flexgrid.

    How the exporting should be handle exporting of FlexGrid to image for large data since the image would be too large if data is larger.

    Please elaborate the requirement.

    ~Manish

  • Posted 7 December 2017, 1:40 am EST

    Manish,

    We are dynamically populating grid columns it depends on our company data size but we have around 25 columns and 60 rows.

  • Posted 7 December 2017, 2:00 am EST

    Hi,

    What about image size for exporting data. How larger data should be handled to fit in image size.

    ~Manish

  • Posted 7 December 2017, 3:05 am EST

    The image must be drawn based on provided data. If the data is larger than the image will be larger and vice versa.

  • Posted 10 December 2017, 8:53 pm EST

    Hi Eric,

    As you currently, we support Excel and PDF export. Hence, could you please let us know the use case scenario to export FlexGrid to image format. So that we can provide you a solution from discussion with the concerned team on your scenario.

    ~Manish

  • Posted 12 December 2017, 2:09 am EST

    The scenario is straightforward we just export the displayed grid as it is in image format(JPG, PNG or).

  • Posted 13 December 2017, 12:37 am EST

    Hi Eric,

    We have forwarded the enhancement request to the concerned team for further investigation with tracking id 300729.

    If this is found feasible, this feature may be added to the future releases.

    ~Manish

  • Posted 2 February 2018, 7:48 pm EST

    Hi Eric,

    Currently, this is not supported and there is no plan to add it.

    It is not a common/useful scenario, and is not easy to add since HTML does not have a built-in way to convert DOM elements into images.

    We do have more common/useful export options like XLSX, PDF, or PrintDocument.

    However, if you would like to do this, he should try one of the libraries available to convert DOM into canvas, and then export the canvas content to an image format.

    Here is a link to a library that does this:

    https://ourcodeworld.com/articles/read/38/how-to-capture-an-image-from-a-dom-element-with-javascript

    And here’s a fiddle showing the results:

    http://jsfiddle.net/Wijmo5/m20yxknf/

    It’s pretty good, but not perfect. The library does not handle scrolled grid content. Seems like a good start though…

    ~Manish

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels