SetDataSource to update data within the spreadsheet instance

Posted by: davide.vago on 5 September 2019, 11:48 pm EST

  • Posted 5 September 2019, 11:48 pm EST

    Good morning/evening

    I'm reaching you out as I'm currently trying to update the datasource within an instance and I'm facing weird behaviours.

    Given a dataSource array I have a function that updates the value of the dataSource based on a multiplier and I need to reload the whole dataSource
    within the same sheet instance.

    setDataSource apparently keeps multiplying the existing value for each iteration without picking up the original array (it seems like the setDataSource function generates a cloned reference of the passed array)

    However, there is also a reload flag which is supposed to reload the whole sheet but I can't use it as:
    1 - the whole instance loses all the style, bindings and listeners
    2 - it freezes the whole instance for few seconds even if there are suspendPaint/resumePaint called as wrapper of the setDataSource function.

    I found this previous post but I'm not sure if still applicable as the solution was a bit hacky. https://www.grapecity.com/forums/spread-views/reload-data
  • Marked as Answer

    Replied 6 September 2019, 2:14 am EST

    Apologies for the post.

    Forget it, I found the solution.
Need extra support?

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

Learn More

Forum Channels