Before I create a sample project with a schedule, can you explain what I should include as yourdatasource.
I am using MVC wrappers. and my resources are coming from the server. I tried binding to a kendo observable viewmodel but that did not seem to work.
see my schedule and my template below.
Thanks
@code
Dim s As Kendo.Mvc.UI.Scheduler(Of BO.Models.Bookings.BookingEvent) = Html.Kendo().Scheduler(Of BO.Models.Bookings.BookingEvent)() _
.Name("scheduler") _
.Date(Date.Today) _
.StartTime(Date.Today.AddHours(7)) _
.Height(600) _
.Timezone("Etc/UTC") _
.Editable(Function(e) e.TemplateId("ScheduleEditTemplate")) _
.Resources(Function(resource) resource.Add(Function(m) m.TeamId) _
.Title("Owner") _
.DataTextField("Name") _
.DataValueField("TeamId") _
.DataColorField("Color") _
.DataSource(Function(d) d.Read("resouces", "services", New With {.area = String.Empty}))) _
.Views(Sub(views)
views.DayView()
views.WeekView(Function(weekView) weekView.Selected(True))
views.MonthView()
views.AgendaView()
End Sub) _
.DataSource(Function(d) d.Model(Sub(m)
m.Id(Function(f) f.BookingId)
End Sub) _
.Read("read", "services") _
.Create("create", "services") _
.Destroy("destroy", "services") _
.Update("update", "services"))
s.Render()
End Code
<
script
id
=
"ScheduleEditTemplate"
type
=
"text/x-kendo-template"
>
<
section
class
=
"schedule-template row-fluid"
>
<
p
class
=
"span12"
>
<
span
>${Address}</
span
>
</
p
>
<
p
class
=
"span12"
>
<
label
>Start: <
input
data-role
=
"datetimepicker"
data-bind
=
"value: start"
/></
label
>
</
p
>
<
p
class
=
"span12"
data-container-for
=
"TeamId"
>
<
label
>
Team:
<
select
id
=
"teams"
data-role
=
"combobox"
data-bind
=
"value: TeamId"
data-bind
=
"source: yourdatasouce"
/>
</
label
>
</
p
>
<
p
class
=
"span12"
>
<
label
>Notes: <
textarea
data-bind
=
"value: notes"
/></
label
>
</
p
>
<
p
>
<
input
type
=
"checkbox"
value
=
"${Completed}"
/><
button
data-schedule-edit-booking-complete
=
"${BookingId}"
>Mark complete</
button
>
</
p
>
</
section
>
</
script
>