Hi
I am trying to create a vertical grouping based on the data from our db.
The usecase is to show a continuous event spanning whatever start and end time, for each Room (the duplicate is a db issue so nevermind that). So i dont want the time rows, and would like to remove them permanently.
I attached some screenshot of what i want it to look like (ish), also done with telerik schedule, but in WPF.
And an image of what my attempt looks like in mvc.
Heres my mvc razor code:
@model IList<WebStaffScreen.Models.TaskViewModel>
@using Kendo.Mvc.UI
@(Html.Kendo().Scheduler<WebStaffScreen.Models.TaskViewModel>()
.Name("booking_scheduler")
.DateHeaderTemplate("<span class='k-link k-nav-day'>#= kendo.toString(date, 'dd-MM-yyyy') #</span>")
.Date(DateTime.Now)
.StartTime(DateTime.Now)
.CurrentTimeMarker(false)
.AllDaySlot(true)
.Views(v => {
v.WeekView(x => x.Selected(true));
v.TimelineView();
})
.Timezone("Etc/UTC")
.Group(g => g.Resources("Rooms").Orientation(SchedulerGroupOrientation.Vertical))
.Resources(r => r.Add(m => m.RoomID)
.Title("Room")
.Name("Rooms")
.DataTextField("RoomName")
.DataValueField("RoomID")
.DataColorField("AppointmentColor")
.BindTo(Model)
.DataSource(d => { d.Custom().Transport(t => t.Read(x => x.Action("GetRoomsInResidence", "Booking"))).Schema(s => s.Model(m => { m.Id("RoomID"); m.Field("RoomName", typeof(string)); })); })
)
.DataSource(d => d
.Model(m => {
m.Id(f => f.TaskID);
m.Field(f => f.Title).Editable(false);
m.Field(f => f.Start).Editable(false);
m.Field(f => f.End).Editable(false);
})
.Read("Read", "Booking")
.Create("Create", "Booking")
.Update("Update", "Booking")
.Destroy("Destroy", "Booking")
)
)
The data finally comes out and it creates the rows (except for the colors), and adds them to the correct resource group's all day row.. But all the rows with time needs to go away, because its simply not needed for this particular scheduler view.
Can you please help?