on 02-09-2017 4:41 PM
Hi,
I am trying to use the same Pop up to display a chart component for which i dynamically change the data selection in the script based on the user selection.
The pop up works fine when it opens the first time but when i close the Pop up (using the close() function) the next pop up behavior is impacted. The chart displays an error "Attach a data source" when the other pop up is opened.
Although, if i close and re-open the pop up again i see the chart correctly. After closure, the same pop-up needs to be opened twice to display data correctly. Please let me know if there is something i am doing incorrectly.
Below are the screenshots of a demo application -
1. The application has two buttons, which open a pop up containing a chart. One button is used to display US data and the other to display UK data in a chart.
2. Upon clicking the US Data button, the pop up is opened displaying the US chart.
3. After closing the previous pop-up and clicking on the UK data button, the following error is displayed.
4. Upon closing the above popup and re-clicking the UK data button, the chart is displayed correctly as shown below.
Hi Saleh,
Sorry about the late follow-up. I have been able to reproduce your issue. If you ask me, it's a bug. However, I have found that the following workaround resolves the issue. Update the code in your Close button to read as follows:
POPUP_1.close();
DS_1.reloadData();
Since there is no change in the underlying data, the reloadData() doesn't actually reload the data, so there is no performance hit but it resolves the "Attach a data source to component" error.
Regards,
Mustafa.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Mustafa,
Thanks for looking into this. The above solution resolves the issue.
Thanks,
Waleed
any update on this ? I am facing exact the same issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.