We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

how to change captions programmatically

Resolved
Massimo asked on December 17, 2021

Hi team,
i would like to know how can i change programatticaly all the captions of the mappingObject? 
 
Thank you in advance 
 
Massimo 

1 answer

Public
Vera Didenko Vera Didenko Flexmonster December 20, 2021

Hello, Massimo,
 
Thank you for your question.
 
You could provide a new mapping object with updated captions. Then reload the data via the connectTo() API call or reset the report with the setReport() API call. As a result, Flexmonster will apply the new mapping object with the new captions.
Here is a JSFiddle example demonstrating this approach: https://jsfiddle.net/flexmonster/n1vqmhrc/.
 
Please consider that the mapping object is part of the data structure definition. This is why it is necessary to reload the data or reset the report in Flexmonster if the mapping object changes.
 
Please let us know if this works.
 
Kind regards,
Vera

Please login or Register to Submit Answer