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;
}
}