Hello,
I have a Server binded Scheduler with a Timeline View set to group by but it does not work.
My ASPX code:
<telerik:RadScheduler runat="server" ID="RadScheduler1" EnableAdvancedForm="false" AllowDelete="false"
AllowEdit="false" AllowInsert="false" CssClass="test" ShowFooter="false"
SelectedView="TimelineView" Height="500"
onappointmentdatabound="RadScheduler1_AppointmentDataBound"
OnResourcesPopulating="RadScheduler1_ResourcesPopulating" >
<WebServiceSettings Path="~/Controllers/SchedulerWebService.asmx" ResourcePopulationMode="ServerSide" />
<TimelineView GroupingDirection="Vertical" NumberOfSlots="31"
ColumnHeaderDateFormat="dd" GroupBy="Car" />
<AdvancedForm Modal="false" />
<MultiDayView UserSelectable="false" />
<MonthView UserSelectable="true" />
<WeekView UserSelectable="true" />
<DayView UserSelectable="true" />
My code behind code:
protected void Page_Load(object sender, EventArgs e)
{
List<Model> list = facade.List();
foreach (Model obj in list)
{
RadScheduler1.Resources.Add(new Resource("Car",
obj.Id, obj.BuyDate.ToString("dd/MM/yyyy")));
}
}
in the Web Service code I have implemented the GetAppointments and the GetResources methods. The GetAppointments returns a list of AppointmentData objects which are created in this way:
AppointmentData appointment = new AppointmentData();
appointment.ID = obj.ID;
ResourceData rd= new ResourceData();
rd.Key=appointment.ID;
appointment.Resources.Add(rd);
appointment.Subject = obj.ID;
appointment.Start = obj.Visit;
appointment.End = appointment.Start.AddHours(8);
appointments.Add(appointment);
What I'm getting with this code is a Scheduler with the added resources in the first column but it does not show the appointments.
Please hellp me with this control. Thanks.