☝️Small business or a startup? See if you qualify for our special offer.
+

When calling flexmonster.save({})

Answered
jedison asked 5 days ago

Hi, I'm having an issue that when I call save(), after the user edited a cell on drillthrough or even on flat mode, the data that is send on the request is not updated according to the edition made by the user. Note that im using server destination.

save() {
    this.pivotTable.flexmonster.save({
      filename: 'report.json',
      destination: 'server',
      url: `myURL`,
      serverContentType: 'application/json',
    });
}

1 answer

Public
Solomiia Andrusiv Solomiia Andrusiv Flexmonster 3 days ago

Hello, Jedison!

Thank you for contacting us.

Kindly note that Flexmonster is designed as a data visualization tool first. Therefore, we don't change the underlying data in the dataset by ourselves, even with editing enabled.

We have added the datachanged event to track when the data was changed in Flexmonster. Then you can apply your custom data validation and the necessary changes to your data in the event handler. After the data is updated in the datasource, you can refresh the data on the grid using the updateData API call if necessary.

Here is the JSFiddle to illustrate the idea: https://jsfiddle.net/flexmonster/3sryh5wm/.

We also wanted to mention our exporting feature, which always saves the current data visualization on the grid, including edited data.
So, in case only the data changes need to be saved, you may find our export to the server feature useful: https://www.flexmonster.com/doc/export-report/#destinationtype-csv.

Hope you will find our answer helpful.

Kind regards,
Solomiia

Please login or Register to Submit Answer