This is a migrated thread and some comments may be shown as answers.

Retrieving resources from a database

2 Answers 122 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Myles
Top achievements
Rank 1
Myles asked on 08 Mar 2020, 10:01 PM
Are there any examples out there of retrieving and setting scheduler resources via a HttpClient?  All of the examples on the demo pages use hard coded resources within the component.  I'm struggling to get resources working when retrieving them from a persisted backend resource via HttpClient.  The data comes back from the API Ok but the Scheduler spits out numerous exceptions.  

2 Answers, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 10 Mar 2020, 11:56 AM

Hi Myles,

In general, all Kendo UI for Angular components are simply representational ones. This means that they can visualize any data that is passed to them as long as it is in a supported format. Check the following article that demonstrates the supported approaches of how we can bind some data to the Scheduler:

https://www.telerik.com/kendo-angular-ui/components/scheduler/data-binding/ 

Indeed there is no available example that uses remote data binding. However, to group the Scheduler data by some resources, ensure that the data is received before defining the [group] and [resource] options. Here is an example, with local data, but assigned in setTimeout callback in order to simulate asynchronous operations. Basically, the data needs to be available locally before applying the group configurations (for group and resource options)

https://stackblitz.com/edit/angular-vgmy3j?file=app/app.component.ts

Please take a look at the above StackBlitz. Let me know how it goes and if you have any further questions do not hesitate to contact us back.

Regards,
Martin
Progress Telerik

Get quickly onboarded and successful with your Telerik and Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Myles
Top achievements
Rank 1
answered on 10 Mar 2020, 08:14 PM

Thanks so much.  It was indeed a timing issue.  I was setting the grouping before the event data.

 

Regards

Myles

Tags
Scheduler
Asked by
Myles
Top achievements
Rank 1
Answers by
Martin
Telerik team
Myles
Top achievements
Rank 1
Share this question
or