We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Adding data to 'e-resource' dynamically

Hi all,

While I'm receiving data from an API, I need to populate the array associated to my e-resource at my schedule, but it only works if I do it before this component is mounted. I need to call the method "loadData()" inside "ngOnInit" and dynamically, according to user requests... There are screenshots of my code (html and ts)




After this functions ends, both arrays are filled properly, but the data is not displaying on the schedule.
Any ideas?

3 Replies

HB Hareesh Balasubramanian Syncfusion Team July 25, 2019 04:48 PM UTC

Hi Sergio, 

Greetings from Syncfusion Support. 

We have prepared a sample, such that data source for the resources has been assigned in ngOnInit function, which can be viewed from the following link, 

Please try the above sample, if you have any concerns please revert us back for further assistance. 

Regards, 
Hareesh 



SE Sergio July 25, 2019 05:37 PM UTC

Hi again,

Few hours ago I could resolve my problem, but thanks for the support anyway!

As I supposed, simply refreshing the scheduler component makes all the data appears on it without problems, so I attached a #mySchedule tag on the schedule html component, and then call the refresh method like this:

this.mySchedule.refresh();


I hope this could help somebody else


KK Karthigeyan Krishnamurthi Syncfusion Team July 26, 2019 03:56 AM UTC

Hi Sergio, 
 
We are happy that your problem has been fixed 😊 
 
Regards, 
Karthi 


Loader.
Live Chat Icon For mobile
Up arrow icon