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

Scheduler stay empty

1 Answer 145 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 17 Dec 2014, 03:16 PM
Hi,

In my app, I have a scheduler that I try to fill using  the DataSource.Read but it stay empty.
I verified the data arrives to the client but it seems not to be understand by the control.
Here's a bit of code:

@(Html.Kendo().Scheduler<xxx.Website.Models.Lesson>()
    .Name("scheduler")
    .Date(new DateTime(2014, 12, 12))
    .StartTime(new DateTime(2014, 12, 8, 9, 00, 00))
    .EndTime(new DateTime(2014, 12, 5, 14, 00, 0))
    .Height(700)
    .AllDaySlot(false)
    .Views(views =>
    {
        views.WeekView();
    })
            .Resources(resource =>
              {
                  resource.Add(m => m.LessonType).Title("Lesson Type").DataTextField("Text").DataValueField("Value").DataColorField("Color").BindTo(new[]{
                  new { Text = "Group1", Value=1, Color="#DC8166"},
                  new { Text = "Group2", Value=2, Color="#889DAE"},
                  new { Text = "Group3", Value=3, Color="#91DE80"},
                  new { Text = "Group4", Value=4, Color="#FFD24D"}
          });
              })
    .Timezone("UTC")
  .Editable(false)
        .DataSource(d => d
                .Model(m =>
                {
                    m.Id(f => f.Id);
                    m.Field(f => f.Title).DefaultValue("No title");
                })
                .Read(read => read.Action("Read_Scheduler", "Administration").Data("getDates"))
)
)

I already use a scheduler on another page but using the BindTo method which work just fine.
Here I need to call server to update the scheduler when the user change displayed the week.

What do I miss ?

Regards,

David

1 Answer, 1 is accepted

Sort by
0
Georgi Krustev
Telerik team
answered on 19 Dec 2014, 08:26 AM
Hello David,

I answered to the support thread opened on the same subject. I would like to ask you continue our discussion there to avoid any duplication. Thank you for your understanding.

Here is a quote of the answer:

The setup of the widget looks correct. I would suggest you wire the error event of the DataSource and verify that there are no exceptions. If the problem still persists then I will ask you send us more details about your current implementation. A runnable test project will be of a great help to narrow the problem down much faster and advice you further.

Regards,
Georgi Krustev
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Scheduler
Asked by
David
Top achievements
Rank 1
Answers by
Georgi Krustev
Telerik team
Share this question
or