I know that once pivot is created, if I want to update the data, I can use
updateData()
method and pivot will be updated.
In my case, on my form, currently I save different layouts of the pivot and show them under dropdown like user can save the layout of pivot in grid, charts , with different options etc. Now when I change from one layout to another, I am actually creating the pivot again by calling
new Flexmonster( /*all the setting including data */).
Is this the correct way or there is a better way , in order to improve the performance (to avoid creating pivot all over again ) where I can simply update the configuration object along with data and then call something like
flexmonster.updateSettingsAndData()
?
should I use setReport method ?
Hello Sohan,
Thank you for your question. Yes, you are right, the creation of a new component's instance each time you want to change the configuration gives bad influence on the performance. The more efficient approach is to set the new configuration without recreating the pivot object. As you mentioned above the best way to do it is to use the setReport()
API call. This method allows dropping the old configuration and applying the new one on the run.
Please let us know if it solves your case.
Regards,
Dmytro.
Thanks, it solves my case.