Change attribute type

Posted by: pedro.moraes on 7 March 2023, 3:50 am EST

    • Post Options:
    • Link

    Posted 7 March 2023, 3:50 am EST - Updated 7 March 2023, 3:55 am EST

    Hello,

    I’m setting up the definitions for my columns from the IColumn interface, but I’d like to modify the formatter’s type:

    because I’m going to pass the value as a parameter the same is done in value

    It’s possible?

  • Posted 8 March 2023, 10:26 pm EST

    Hello Pedro,

    I would like to bring to your attention that the formatter property of the IColumn interface is intended for applying the formatter for the entire column. This is why the property takes a string value. It is not possible to modify the formatter property of the IColumn interface to be a function since this behavior is by design.

    However, if you need to apply different formatters to cells within the same column, you may utilize the sheet.setFormatter() method to specify different formatters for individual cells.

    In order to better assist you, please provide us with more details regarding your use case. If you encounter any difficulties, please do not hesitate to inform us.

    setFormatter: https://www.grapecity.com/spreadjs/api/v16/classes/GC.Spread.Sheets.Worksheet#setformatter

    Thank you and best regards.

    Regards,

    Ankit

Need extra support?

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

Learn More

Forum Channels