All appointments on calendar are triggering only one appointments handlers

2 posts, 0 answers
  1. John
    John avatar
    1 posts
    Member since:
    Feb 2014

    Posted 26 Feb 2015 Link to this post

    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">
                    <%# Eval("Subject") %>
                <%# Eval("MyName") %>  <%# Eval("MyString") %> 
                <%# Eval("MyInfo") %>
            <AdvancedForm Modal="True" />
                <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") %>'/>

    In the AdvancedFormTemplate.ascx.cs:

            protected Appointment Appointment
                    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;

    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?
  2. Bozhidar
    Bozhidar avatar
    1096 posts

    Posted 03 Mar 2015 Link to this post


    The provided code snippet seems ok. The only thing that comes to mind is that the provided appointments have the same ID. Could you confirm whether that is the case (in your post you specified the appointment names, but not the id's). If the ID's are also different, in order to pinpoint the reason for the problem we would need a runnable sample project that we can test locally, since we haven't encountered this issue before and can't point to a solution from previous encounters. So please open a support ticket and send us a runnable project, following the instructions from the following article:


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

  3. DevCraft R3 2016 release webinar banner
Back to Top