Spread Js control not resizing properly

Posted by: tadekunle on 3 September 2021, 5:50 pm EST

    • Post Options:
    • Link

    Posted 3 September 2021, 5:50 pm EST

    Hello,

    I am currently trying to create a spread control in two separate tabs (using the angular tab) but I am having some difficulties as the spread control is not resizing properly. This issue is similar to the one described in this forum post https://www.grapecity.com/forums/spreadjs/spreed-js-container-div-no

    I tried the solution suggested in the linked forum post as well, but it didn’t work

    When trying to create an empty spread control in a new component, I experience this problem where the spread control is only visible in a tiny corner and it does not resize properly. This can be seen in the first screenshot

    However, if I use an already existing component in the tab, it works perfectly fine and the spread is resizing as expected as seen in the second screenshot.

    How can I ensure that whenever I want to create a new component in a new tab and add a spread control to that component, the spread resizes properly. Code snippets are attached as well for the angular tab and the new component.attachments.zip[img]https://gccontent.blob.core.windows.net/forum-uploads/file-1ac463c2-db79-4fce-86ae-2fa17fc18197.PNG[/img][img]https://gccontent.blob.core.windows.net/forum-uploads/file-6132e7e7-d428-4dea-b239-bb7c8546d8e8.PNG[/img]

  • Posted 6 September 2021, 4:47 am EST

    Hi,

    For this, you need to call the refresh method after any tab gets changed. Please refer to the following sample that demonstrates how we could use multiple sheets with the mat-tab-group component.

    sample: https://stackblitz.com/edit/angular-selecting-mattab-xgukqd?file=src/app/app.component.html

    refresh method: https://www.grapecity.com/spreadjs/docs/v14/online/SpreadJS~GC.Spread.Sheets.Workbook~refresh.html

    Rregards,

    Avinash

Need extra support?

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

Learn More

Forum Channels