This is a migrated thread and some comments may be shown as answers.

RecurrenceParentID

2 Answers 72 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Marnix Bouwman
Top achievements
Rank 2
Marnix Bouwman asked on 17 Oct 2010, 06:43 AM
Hi, for the insert, I'm doing this:

        Protected Sub rdScheduler_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles rdScheduler.AppointmentInsert
            Dim uid As Integer
            If Not e.Appointment.Resources.GetResourceByType("User") Is Nothing Then
                uid = CInt(e.Appointment.Resources.GetResourceByType("User").ToString)
            Else
                uid = -1
            End If

            objEventController.Add(e.Appointment.Subject, e.Appointment.Start, e.Appointment.End, e.Appointment.RecurrenceRule, e.Appointment.RecurrenceParentID, uid)
        End Sub

This always seem to insert a 0 as e.Appointment.RecurrenceParentID.
That's fine with me, but when I want to delete an item, it will always say somthing like: "Cannot locate the parent of appointment with ID = '5'. Ensure that the parent appointment with ID = '0' exists and is loaded."

So what should I do.

2 Answers, 1 is accepted

Sort by
0
Marnix Bouwman
Top achievements
Rank 2
answered on 19 Oct 2010, 09:56 AM
Possibly related....
I can insert an item, however, when I try to edit, I always get the question wheteher I want to edit only this item, or the series.

So it seams by default it kind of inserts items as recurring items (however they are not recurring).
So when I look in the database I see it always inserts EventRecurrenceRule = "" and EventRecurrenceParentID = 0

What should I modify?
0
Peter
Telerik team
answered on 19 Oct 2010, 04:01 PM
Hi Marnix,

If you are inserting non-recurring appointments, you need to ensure that RecurrenceRule and RecurrenceParentID are saved as null values in the database.


Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Marnix Bouwman
Top achievements
Rank 2
Answers by
Marnix Bouwman
Top achievements
Rank 2
Peter
Telerik team
Share this question
or