AutoFitRow/AutoFitColumn with Formatters

Posted by: evk1027917 on 27 March 2022, 9:37 pm EST

    • Post Options:
    • Link

    Posted 27 March 2022, 9:37 pm EST

    Hi,

    AutoFitRow/AutoFitColumn methods are not working when working with General/Custom Formatters. could you let me know how to fix this.
    

    please find attachment of the issue.features_cells_formatter_custom-formatter_JavaScript.zip

  • Posted 29 March 2022, 11:16 pm EST

    Hi Vamshi,

    Upon investigation, we found out that you are formatting the value using general formatter in the formatNumber method(line no. 27 in app.js file). The format method formats the specified object as a string with a formatter data object. While returning from the formatNumber function, you should return the new formatted string.

    Changes I have made to the code with respect to file app.js:

    1. Store the formatted string in a new variable called newValue(line no. 27).
    2. Return the formatted string from the formatNumber function (line no. 67).
    3. Change the order of setting the autoFitColumn.

    Format Method: https://www.grapecity.com/spreadjs/docs/latest/online/SpreadJS~GC.Spread.Formatter.GeneralFormatter~format.html

    Please refer to the attached sample and let us know if you need further assistance.

    Regards

    Ankit

    features_cells_formatter_custom-formatter_JavaScript.zip

Need extra support?

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

Learn More

Forum Channels