Reload data

Posted by: jkainth on 22 March 2018, 1:14 am EST

  • Posted 22 March 2018, 1:14 am EST

    I have initialized a dataView with an array of data objects.

    How do i go about replacing this data array with another one without destroying and recreating a new dataView?
    The columns, templates all remain the same, just the data collection changes.

    Couldn't find anything clear in the docs.


  • Replied 22 March 2018, 2:55 am EST

    Seems like i can refresh the data by:

    dataview.data.setSource_(newArray);
    dataview.invalidate();

    Although seems fishy calling a method that ends with a _? private? might disappear in your next release?

    either way, let me know if there is a better approach.
  • Marked as Answer

    Replied 23 March 2018, 2:07 am EST

    Hello,

    Although it is a private method but you can use it to set the data source for Spread.Views.


    Thanks,
    Deepak Sharma
Need extra support?

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

Learn More

Forum Channels