No RecurrenceRule data on OnAppointmentInsert

11 posts, 0 answers
  1. Brian
    Brian avatar
    6 posts
    Member since:
    Nov 2007

    Posted 19 Jun 2008 Link to this post

    Hi,

    I have a function:

    protected void scheduler_AppointmentInsert(Object sender, SchedulerCancelEventArgs e) 
    ... 

    When using all of RadScheduler's default templates for inserting and such, RecurrenceRule always seems to be empty and RecurrenceState is always NotRecurring. I'm using e.Appointment.RecurrenceRule to try to access it. All of the other data is there (title, end time, start time)

    As far as I know, we are currently using the most up-to-date patch (that isn't officially released yet). Is this a bug or am I doing something wrong?


  2. Brian
    Brian avatar
    6 posts
    Member since:
    Nov 2007

    Posted 19 Jun 2008 Link to this post

    Nevermind, I figured it out.

    I was setting the DataRecurrenceField and DataRecurrenceKeyField properties declaratively, which allowed the Recurrence options to show up in the Insert dialog, but wouldn't allow them to actually be passed.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 05 Jun 2009 Link to this post

    I'm NOT setting mine declaritively, rather doing it programatically (although I've tried both), recurrence is always NotRecurring and RecurringParentID=null...

    What am I missing?
  5. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 08 Jun 2009 Link to this post

    Anyone know the secrete of the RecurrenceState?  No matter what approach I use, and none of the demos either, the RecurrenceState is always =NotRecurring.  I'm checking the RecurrenceRule for string.empty and setting the RecurrenceState manually, but this approach doesn't work 100%.
  6. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 08 Jun 2009 Link to this post

    Hi Doug,

    We are not sure why you experience this problem. Can you open a support ticket and send us a simple demo of the issue?

    RecurrenceState is enum with four possible values:

    RecurrenceState.Exception;
    RecurrenceState.Master;
    RecurrenceState.NotRecurring;
    RecurrenceState.Occurrence;

    There aren't any known issues with RecurrenceState at the moment.


    Greetings,
    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  7. Julio
    Julio avatar
    2 posts
    Member since:
    Jul 2007

    Posted 22 Jun 2009 Link to this post

    I have the same problem. I was using a customized AdvancedFormTemplate and now it doesn't work. I can't get the RecurrenceRule.
  8. Peter
    Admin
    Peter avatar
    6637 posts

    Posted 22 Jun 2009 Link to this post

    Hi Torres,

    Please, open a ticket and send us a simple demo of the issue.


    Peter
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  9. Doug Beard
    Doug Beard avatar
    52 posts
    Member since:
    Jan 2008

    Posted 06 Jul 2009 Link to this post

    A 'simple demo' is impossible since the DB can not be included.
    This problem occurs with all setups, including the demos provided with the installer, it should be very easy for you to recreate.

    The appointment in SchedulerCancelEventArgs of the AppointmentInsert handler is ALWAYS RecurrenceState.NotRecurring.

    I'm currently manually setting it to RecurrenceState.Master but I have symptoms in recurring appointments I believe are related to this problem.  Such as upon immediate postback after a Recurring appointment insert the first occurrence of the appointment shows the broken recurrence symbol.  If one attempts to edit the series from that partical occurence an error is thrown complaining about the RecurringParentID.  However, if you refresh (F5) the page, it works as expected.  Any subsequent navigation to the page works as intended, only the immediate postback is problematic.

    All of this is symptomatic of having to physically set RecurrenceState.Master

    I suggest adding a NeedDataSource pattern would be infinitely helpful in datasource customization and overcoming problems such as this.
  10. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 09 Jul 2009 Link to this post

    Hello guys,

    You are all right - in AppointmentInsert the RecurrenceState is NotRecurring and this is not the expected state. We logged the problem in our bug tracking system and will fix it for the next service pack.

    As a workaround you can set this property manually and this should not cause any additional problems.

    Best wishes,
    Veselin Vasilev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  11. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 19 Nov 2009 Link to this post

    Can anyone comment whether this has been resolved?
    I am using 2009.3.1103.35 and I am still seeing this.
    I am using the web service binding approach.

            <telerik:RadScheduler    ID="RadScheduler1"  
                                                runat="server"  
                                                Height="800" 
                                                HoursPanelTimeFormat="htt"  
                                                ValidationGroup="RadScheduler1"  
                                                Skin="WebBlue" SelectedView="WeekView"  
                ShowFullTime="True" StartInsertingInAdvancedForm="True"  
                MaximumRecurrenceCandidates="10000" > 
                <WebServiceSettings Path="SchedulerWebService.asmx"  
                    ResourcePopulationMode="ClientSide" /> 
                <advancedform maximumheight="550px" modal="True"  
                    enablecustomattributeediting="True" enableresourceediting="False" /> 
                <AppointmentContextMenuSettings EnableDefault="true" /> 
            </telerik:RadScheduler> 

            private WebServiceAppointmentController _controller; 
     
            /// <summary> 
            /// The WebServiceAppointmentController class is used as a facade to the SchedulerProvider. 
            /// </summary> 
            private WebServiceAppointmentController Controller 
            { 
                get 
                { 
                    if (_controller == null) 
                    { 
                        _controller = new WebServiceAppointmentController(new OutputControlScheduleProvider()); 
                    } 
                    return _controller; 
                } 
            } 

    I double click on a Day in the calendar and I click the recurrence check box. The debugger immediately jumps me to the InsertAppointment method:

            [WebMethod] 
            public IEnumerable<AppointmentData> InsertAppointment(SchedulerInfo schedulerInfo, AppointmentData appointmentData) 
            { 
                return Controller.InsertAppointment(schedulerInfo, appointmentData); 
            } 

    In appointmentData the recurrenceState parameter is unexpectedly set to NotRecurring even though the RecurrecneRule is properly set; at least it seems to be.


    Also on a related side note, when should the parentRecurrenceId be set to some value?

    Thanks.
  12. T. Tsonev
    Admin
    T. Tsonev avatar
    2772 posts

    Posted 25 Nov 2009 Link to this post

    Hello,

    You're correct - the RecurrenceState is not being set in this case. We'll fix this in a week or so, but in the meantime you can use this code to properly set it based on the RecurrenceRule and RecurrenceParentID properties:

    RecurrenceState initialState = RecurrenceState.NotRecurring;
    if (aptData.RecurrenceParentID != null)
    {
        initialState = RecurrenceState.Exception;
    }
    else
        if (aptData.RecurrenceRule != string.Empty)
        {
            initialState = RecurrenceState.Master;
        }

    The RecurrenceParentID is used to associate "recurrence exceptions" (edited appointments) with the recurrence series that they belong to. More info here:

    http://www.telerik.com/help/aspnet-ajax/schedule_serversideworkingwithrecurringappointments.html

    Best wishes,
    Tsvetomir Tsonev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017