How to tell flexmonster to show an error message

Answered
Ankush asked on September 19, 2018

I am setting data into flexmonster using setReport API(Ajax call is made to load the data), now lets say, AJAX call ended with an exception, in this case, I want to show some error message in flexmonster grid. Is there any way by which I can achieve it.

5 answers

Public
Tanya Gryshko Tanya Gryshko Flexmonster September 19, 2018

Hello, Ankush,
Thank you for writing to us!
Could you please specify how the report object used in setReport looks like for your case? If the dataSource section of the report contains filename pointing to the script which returns the data, there is an approach to display custom error message. For more details please refer to this forum thread: https://www.flexmonster.com/question/return-error-occurred-in-api/. Please share your thoughts on the subject.
Regards,
Tanya

Public
Ankush September 20, 2018

Hi Tanya,
 
Please check this fiddle http://jsfiddle.net/trLb40ao/18/
In actual code, getData function makes a post call for getting the data. I can't make get call and cannot use filename approach as well, because it will also make get call only.
report: {
  dataSource: {
    dataSourceType: "json",
    filename: "http://test.com/dataFile"
  }
}
 

Public
Iryna Kulchytska Iryna Kulchytska Flexmonster September 20, 2018

Hi Ankush,
 
Thank you for the clarification.
 
We will add the new API call to show an error message in Flexmonster. It will be released in the minor version on October 8th.
 
Will this work for you?
 
Kind regards,
Iryna

Public
Ankush September 20, 2018

Yes, Thank you.

Public
Dmytro Zvazhii Dmytro Zvazhii Flexmonster October 10, 2018

Hello Ankush,
We are glad to inform you that the new alert() API call is already available in the latest version.
Please find more information here: https://www.flexmonster.com/api/alert/.
Regards,
Dmytro

Please login or Register to Submit Answer