Extend control of ImageLayout

Posted by: davide.vago on 29 July 2021, 7:50 am EST

    • Post Options:
    • Link

    Posted 29 July 2021, 7:50 am EST

    Hi there,

    Looking at this documentation: https://www.grapecity.com/spreadjs/docs/v14/online/SpreadJS~GC.Spread.Sheets.ImageLayout.html?highlight=imagelayout%2C

    It appears there are a few options to control the background of a cell, I’m wondering if you could please extend this object to match the css positioning.

    In particular it would be nice to be able to control the positioning in terms of X and Y like

    X could be left, center, right

    Y could be top, center, bottom

    e.g. left center

    The scenario is:

    I would like to be able to control the image in order to have an image next to the cell text.

    The image shouldn’t be visible when downloading the excel file from your IO library so a floating picture object wouldn’t be reasonable.

  • Posted 30 July 2021, 7:30 am EST

    Hi Davide,

    This is expected behavior. The background image is set for the entire cell. If you want to add an image on a particular x, y, the cell may implement the custom cell and draw the image inside the paint method, Please refer to the following demo that demonstrates the implementation of custom cellType.

    demo: https://www.grapecity.com/spreadjs/demos/features/cells/cell-types/custom#demo_source_name

    Further, if you want to add the image at left or right of the cell you may also try the cell buttons with images. Please refer to the following Demo:

    cellButtons: https://www.grapecity.com/spreadjs/demos/features/cells/cell-buttons#demo_source_name

    Regards

    Avinash

Need extra support?

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

Learn More

Forum Channels