I'm having a problem with the telerik:radscheduler control. I have a calendar with three appointments on it (Tuesday 12:30-1:30, Wednesday 7-4, Thursday 12:30-1:30 named ctl00_MainContent_Scheduler_1_0,ctl00_MainContent_Scheduler_0_0, ctl00_MainContent_Scheduler_2_0 respectively).
If you open or move any of the events, the only appointment that is effected is the Wednesday (ctl00_MainContent_Scheduler_0_0) appointment that is affected. If you move the Thursday event up a week, the Wednesday event is the one that's moved. Same with Tuesday, effect Wednesday. If you open any of the events for details, the Wednesday events details are populated.
I've walked the code and confirmed that the datasource is populating everything correctly.
Here's my code:
The control itself
<telerik:RadScheduler runat="server" ID="Scheduler" SelectedView="MonthView" DayStartTime="07:00:00" DayEndTime="21:00:00"
FirstDayOfWeek="Monday" LastDayOfWeek="Friday" AllowInsert="False" AllowDelete="False" DataKeyField="MyID" DataSubjectField="MyName"
DataStartField="MyDate" DataEndField="MyDateEnd" OnNavigationCommand="Scheduler_OnNavigationCommand" RowHeight="50px"
Height="100%" CustomAttributeNames="MyOtherName, MyString, MyInfo, MyLocation,TimeZoneMessage,Type,MyPlace,MyReason,MyDate, MyDateEnd" OnAppointmentDataBound="Scheduler_OnAppointmentDataBound">
<AppointmentTemplate>
<div>
<%# Eval("Subject") %>
</div>
<div>
<%# Eval("MyName") %> <%# Eval("MyString") %>
</div>
<%# Eval("MyInfo") %>
</AppointmentTemplate>
<AdvancedForm Modal="True" />
<AdvancedEditTemplate>
<scheduler:AdvancedForm runat="server" ID="AdvancedForm" Mode="Edit" Subject='<%# Bind("Subject") %>'
Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' MyName='<%# Bind("MyName") %>'
MyString='<%# Bind("MyString") %>' MyInfo='<%# Bind("MyInfo") %>' Location='<%# Bind("Location") %>'
TimeZoneMessage='<%# Bind("TimeZoneMessage") %>' Type='<%# Bind("Type") %>' MyPlace='<%# Bind("MyPlace") %>' MyReason='<%# Bind("MyReason") %>'/>
</AdvancedEditTemplate>
</telerik:RadScheduler>
In the AdvancedFormTemplate.ascx.cs:
protected Appointment Appointment
{
get
{
SchedulerFormContainer container = (SchedulerFormContainer)BindingContainer;
return container.Appointment;
}
}
container.Appointment always contains the Wednesday control, even if you click on the other two.
Code behind to populate:
Scheduler.DataSource = items;
Scheduler.DataBind();
I've verified items contains exactly what I expect (3 separate and correct events).
When the calendar month displays, the 3 appointments each display the correct information. It's almost like they load correctly but the appointment events are tied to the Wednesday appointment handlers.
Anyone have a clue for this?
If you open or move any of the events, the only appointment that is effected is the Wednesday (ctl00_MainContent_Scheduler_0_0) appointment that is affected. If you move the Thursday event up a week, the Wednesday event is the one that's moved. Same with Tuesday, effect Wednesday. If you open any of the events for details, the Wednesday events details are populated.
I've walked the code and confirmed that the datasource is populating everything correctly.
Here's my code:
The control itself
<telerik:RadScheduler runat="server" ID="Scheduler" SelectedView="MonthView" DayStartTime="07:00:00" DayEndTime="21:00:00"
FirstDayOfWeek="Monday" LastDayOfWeek="Friday" AllowInsert="False" AllowDelete="False" DataKeyField="MyID" DataSubjectField="MyName"
DataStartField="MyDate" DataEndField="MyDateEnd" OnNavigationCommand="Scheduler_OnNavigationCommand" RowHeight="50px"
Height="100%" CustomAttributeNames="MyOtherName, MyString, MyInfo, MyLocation,TimeZoneMessage,Type,MyPlace,MyReason,MyDate, MyDateEnd" OnAppointmentDataBound="Scheduler_OnAppointmentDataBound">
<AppointmentTemplate>
<div>
<%# Eval("Subject") %>
</div>
<div>
<%# Eval("MyName") %> <%# Eval("MyString") %>
</div>
<%# Eval("MyInfo") %>
</AppointmentTemplate>
<AdvancedForm Modal="True" />
<AdvancedEditTemplate>
<scheduler:AdvancedForm runat="server" ID="AdvancedForm" Mode="Edit" Subject='<%# Bind("Subject") %>'
Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' MyName='<%# Bind("MyName") %>'
MyString='<%# Bind("MyString") %>' MyInfo='<%# Bind("MyInfo") %>' Location='<%# Bind("Location") %>'
TimeZoneMessage='<%# Bind("TimeZoneMessage") %>' Type='<%# Bind("Type") %>' MyPlace='<%# Bind("MyPlace") %>' MyReason='<%# Bind("MyReason") %>'/>
</AdvancedEditTemplate>
</telerik:RadScheduler>
In the AdvancedFormTemplate.ascx.cs:
protected Appointment Appointment
{
get
{
SchedulerFormContainer container = (SchedulerFormContainer)BindingContainer;
return container.Appointment;
}
}
container.Appointment always contains the Wednesday control, even if you click on the other two.
Code behind to populate:
Scheduler.DataSource = items;
Scheduler.DataBind();
I've verified items contains exactly what I expect (3 separate and correct events).
When the calendar month displays, the 3 appointments each display the correct information. It's almost like they load correctly but the appointment events are tied to the Wednesday appointment handlers.
Anyone have a clue for this?