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

Resources from DataBase

1 Answer 272 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Rudy
Top achievements
Rank 1
Rudy asked on 19 Jul 2018, 10:14 PM
I am trying to populate the resources for the kendo scheduler with values from the database. I can get events to work with the scheduler but they will not bind to the correct resources. Also I can get Resources to show up without events, but never both working properly. Can I please see an example of how this would be done? Either with MVC or jQuery. Most examples show resources that are hard codded which is not realistic. 

1 Answer, 1 is accepted

Sort by
0
Neli
Telerik team
answered on 23 Jul 2018, 01:06 PM
Hello Rudy,

I have prepared a sample project where the data of the Scheduler resources is loaded from remote end point. The project uses dummy data, not a real database, but the approach will be the same. You could see the behavior of the Scheduler in the project in the linked screencast video. Below is a snippet of the Resources configuration that you will find in the Views -> Home -> Index.cshtml
.Resources(resource =>
{
    resource.Add(m => m.RoomID)
        .Title("Room")
        .DataSource(ds => ds
                .Custom()
                .Transport(transport => transport.Read(read => read.Action("Resources", "Scheduler")))
                .Schema(schema => schema
                    .Data("Data")
                    .Total("Total")                         
                )
            )
        .DataTextField("Text")
        .DataValueField("Value")
        .DataColorField("Color");
})

Could you please try to modify the project in order to replicate the behavior the way it is at your end? This way we could inspect it locally and advise you further. 

Regards,
Neli
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Rudy
Top achievements
Rank 1
Answers by
Neli
Telerik team
Share this question
or