Hi I have flexmonster grid loaded with some data and users will be making changes to the layout and do some conditional formatiing of the data and they would need to save that as a template and reuse that templatenext time when they run the report with diffrerent set of data
Is this possible
Hello,
Thank you for posting on our forum.
If we understand correctly, your requirement is to save the component's configuration and restore it afterward with a different dataset of the same structure (same fields' names, types, etc.).
If so, we suggest saving the configured report to some local or remote storage. A report is a definition of what data should be shown in the component and how it should be visualized. Next, the report can be retrieved from this storage and loaded to the Flexmonster instance.
The report can be saved both locally and remotely using the save API call. You can open the saved report using either open or load methods for local and remote reports respectively.
Updating the dataset depends on the data source used in your case.
For example, if you are connected to the remote JSON/CSV file which is regularly updated, its latest version will be loaded to the component after opening the corresponding report. The same goes for other remote data sources (Elasticsearch, SSAS, Flexmonster Data Server).
If the data is represented as an inline JSON, or it needs to be updated from another remote data source, please use the updateData method. It helps to update data for the report without cleaning the report. Only the dataSource
is updated, whereas the slice, all defined options, number, and conditional formatting, the scroll position stay the same.
Please let us know if it helps.
Looking forward to hearing from you.
Kind regards,
Illia
Do you have a smapple fiddle I am using Json data source
Hello,
We have prepared a sample JSFiddle that would demonstrate this scenario: https://jsfiddle.net/flexmonster/27a4xpzr/. Also, in the attachments, you will find the screen record demonstrating the following set of steps:
Please let us know if it helps.
Regards,
Illia