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

RecurrenceParentID is null when creating the reccuring appointment

1 Answer 42 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Dipen
Top achievements
Rank 1
Dipen asked on 19 Jul 2013, 03:01 PM

Dear Telerik support,

I am using the rad scheduler in my one application. I am getting the e.Appointment.RecurrenceParentKeyId is null when i created the recurring appointment. Also i am facing the problem in deleting and updating the recurring appointment.

Please guide me to resolve these problems. I am looking forward of your response

My database structure is given below:

CREATE TABLE [dbo].[Appointments]

(

[ID] INT IDENTITY(1,1) NOT NULL,

[Subject] nvarchar(255) NOT NULL,

[Description] nvarchar(1024) NULL,

[Start] datetime NOT NULL,

[End] datetime NOT NULL,

[RecurrenceRule] nvarchar(1024) NULL,

[RecurrenceParentID] INT NULL,

[Reminder] nvarchar(255) NULL,

[Annotations] nvarchar(50) NULL,

CONSTRAINT [PK_Appointments] PRIMARY KEY CLUSTERED

([ID]),

CONSTRAINT [FK_Appointments_ParentAppointments] FOREIGN KEY

([RecurrenceParentID])

REFERENCES

[dbo].[Appointments] ([ID])

)

GO



My design page code is given below

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<html xmlns="
http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<telerik:RadScriptManager ID="SchedulerRadScriptManager" runat="server">
</telerik:RadScriptManager>
<telerik:RadScheduler runat="server" ID="EmployeeScheduler" Width="850px" DayStartTime="08:00:00"
DayEndTime="18:00:00" DataKeyField="Id" DataSubjectField="Subject" Height="580px"
DataStartField="StartDate" DataEndField="EndDate" DataRecurrenceField="RecurrenceRule"
DataRecurrenceParentKeyField="RecurrenceParentId" DataReminderField="Reminder"
OnAppointmentInsert="EmployeeScheduler_AppointmentInsert" OnAppointmentCreated="EmployeeScheduler_AppointmentCreated">
<AdvancedForm Modal="true" Enabled="true"></AdvancedForm>
<TimelineView UserSelectable="false"></TimelineView>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
<reminders enabled="true"></reminders>
</telerik:RadScheduler>
</div>
</form>
</body>
</html>





My cs Page code is given below:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;

public partial class Default2 : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}

protected void EmployeeScheduler_AppointmentInsert(object sender, AppointmentInsertEventArgs e)
{
object obj=(e.Appointment.RecurrenceParentID);
string subject = e.Appointment.Subject;
}

protected void EmployeeScheduler_AppointmentCreated(object sender, Telerik.Web.UI.AppointmentCreatedEventArgs e)
{
object obj = (e.Appointment.RecurrenceParentID);
string subject = e.Appointment.Subject;
}


}

 

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 22 Jul 2013, 11:34 AM
Hi Dipen,

 
From the code provided I can see that you are not using DataSourceID property in the mark up of RadScheduler as it is shown in most of our on-line demos so I assume you are using DataSource property somewhere in the not shown code behind to bind your RadScheduler. In such case please refer to this help topic(Using the DataSource property) and this on-line demo where is explained how we recommend achieving such functionality.

Hope this information will be helpful.

Regards,
Plamen
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Scheduler
Asked by
Dipen
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or