I am attempting to add an OnAppointmentDataBound property to my RadScheduler control on an aspx page using ASP.NET web forms and create a corresponding method in the code behind page that will update background colors for the control.
This is what my control looks like on the aspx page:
<telerik:RadScheduler ID="rscCompliance" runat="server" RowHeight="17px" Width="480px" Height="350px"
ReadOnly="true" SelectedView="MonthView" DataKeyField="CaseId" DataSubjectField="Compliance"
DataStartField="WeekBeginningDate" DataEndField="WeekEndDate" AutoPostBack="false" OnAppointmentDataBound="rscCompliance_AppointmentDataBound" >
<AdvancedForm Modal="true" />
<TimelineView UserSelectable="false" />
<AgendaView UserSelectable="false" />
<TimeSlotContextMenuSettings EnableDefault="false" />
<AppointmentContextMenuSettings EnableDefault="false" />
<Reminders Enabled="false" />
</telerik:RadScheduler>
In the code behind:
private void rscCompliance_AppointmentDataBound(object sender, SchedulerEventArgs e)
{
e.Appointment.BackColor = System.Drawing.Color.Green;
}
I get the following compilation error:
"Compiler Error Message: CS1061: 'ASP.pages_adaptivereconditioning_aspx' does not contain a definition for 'rscCompliance_AppointmentDataBound' and no extension method 'rscCompliance_AppointmentDataBound' accepting a first argument of type 'ASP.pages_adaptivereconditioning_aspx' could be found (are you missing a using directive or an assembly reference?)"
Im not sure what directive or assembly reference I would need to add because I already have added the necessary Telerik references. I'm not sure what else I could be missing?
Thanks.