This is a migrated thread and some comments may be shown as answers.
RadScheduler Recurrence data
5 Answers 66 Views
This is a migrated thread and some comments may be shown as answers.
lkeel
Top achievements
Rank 1
lkeel asked on 12 Jul 2011, 12:36 AM
Long story short, I need to manually enter the xml data for my scheduler and I need to make sure that I can setup meetings that reoccur.  I am trying to create a meeting that reoccurs every 3rd Tuesday of every month at 7pm.  I have pasted the appointment below, but it is not working.  Please post corrected appointment so that I can copy it.  

* First problem is that the time is incorrect.  It occurs at 7, but is showing at 6.
* Second problem is that this does not reoccur.

<Appointment>
  <ID>6</ID>
  <Subject>General Meeting</Subject>
  <Description>Some Desc.</Description>
  <Start>2011-07-19T19:00</Start>
  <End>2011-07-19T20:00</End>
  <fRecurrence>1</fRecurrence>
  <RecurrenceData>
    <recurrence>
      <rule>
        <firstDayOfWeek>su</firstDayOfWeek>
        <repeat>
          <monthlyByDay tu="TRUE" weekdayOfMonth="third" monthFrequency="1" />
        </repeat>
        <repeatForever>TRUE</repeatForever>
      </rule>
    </recurrence>
  </RecurrenceData>
 
  <RecurrenceRule>
    <![CDATA[
          DTSTART:20110719T2000
          DTEND:20110719T2100
          RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=1;BYDAY=TU
          ]]>
  </RecurrenceRule>
  <Attribute Key="URL" Value="~/Default.aspx" />
  <Attribute Key="AppointmentType" Value="general" />
</Appointment>

5 Answers, 1 is accepted

Sort by
0
Veronica
Telerik team
answered on 12 Jul 2011, 09:18 AM
Hi Lkeel,

Please try this xml that is generated when I tried to insert an appointment by your criteria and let me know how it goes.
<Appointment>
    <ID>5</ID>
    <Subject>recurring appointment</Subject>
    <Start>2007-03-30T04:00Z</Start>
    <End>2007-03-30T05:00Z</End>
    <RecurrenceRule>
      <![CDATA[DTSTART:20070330T040000Z
DTEND:20070330T050000Z
RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=3;BYDAY=TU
]]>
    </RecurrenceRule>
  </Appointment>


Greetings,
Veronica Milcheva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
lkeel
Top achievements
Rank 1
answered on 12 Jul 2011, 02:50 PM
I am sorry, but this is not working.  It shows up on the initial day, but is not showing up for any of the following months.  Here is my xml.  The only difference that I have between mine and yours is the date that is being used.  Do you have any idea about the time problem?

<Appointment>
    <ID>6</ID>
    <Subject>General Meeting</Subject>
    <Description>All members encouraged to attend to hear where our programs are at.  All meetings are held at the Priceville High School cafeteria.</Description>
    <Start>2011-07-19T20:00</Start>
    <End>2011-07-19T21:00</End>
    <RecurrenceRule>
      <![CDATA[
            DTSTART:20110719T2000
            DTEND:20110719T2100
            RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=3;BYDAY=TU
            ]]>
    </RecurrenceRule>
    <Attribute Key="URL" Value="" />
    <Attribute Key="AppointmentType" Value="general" />
  </Appointment>
0
Veronica
Telerik team
answered on 14 Jul 2011, 11:41 AM
Hello Lkeel,

Could you please send me your project so I can inspect it and help you?

Thank you!

Greetings,
Veronica Milcheva
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
lkeel
Top achievements
Rank 1
answered on 14 Jul 2011, 04:16 PM
I can not load a zip file of a test project so the best I can do is give you the code for each file.  Appointment id 6 is the recurring appointment.  The intention is that the appointment is suppose to occur the 3rd tuesday of every month at 7pm starting on July 19, 2011.

Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
  
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Black">
    </telerik:RadSkinManager>
    <div>
     
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
                    <AjaxSettings>
                        <telerik:AjaxSetting AjaxControlID="RadScheduler1">
                            <UpdatedControls>
                                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" LoadingPanelID="RadAjaxLoadingPanel1" />
                            </UpdatedControls>
                        </telerik:AjaxSetting>
                    </AjaxSettings>
                </telerik:RadAjaxManager>
                <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
 
     
                <telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" TimeZoneOffset="-06:00:00"
                         AllowDelete="false" AllowEdit="false" AllowInsert="false"
                         EnableDescriptionField="true" Height="650px"
                         DataDescriptionField="Description" DataEndField="End"
                    DataKeyField="ID" DataStartField="Start" DataSubjectField="Subject"
                         MonthView-HeaderDateFormat="MMMM yyyy" SelectedView="MonthView" WeekView-HeaderDateFormat="MMMM dd, yyyy"
                         OnAppointmentDataBound="AppointmentDataBound"
                    onappointmentclick="RadScheduler1_AppointmentClick" TimelineView-UserSelectable="false"
                    RowHeight="35px">
 
                    <AdvancedForm Modal="false" />
                    <Reminders Enabled="false" />
                    <TimeSlotContextMenuSettings EnableDefault="true" />
                    <AppointmentContextMenuSettings EnableDefault="true" />            
                    <AppointmentTemplate >
                        <div><%# Eval("Subject") %></div>
                        <div style="height: auto; font-style: italic;"><%# Eval("Description") %></div>
                    </AppointmentTemplate>
                </telerik:RadScheduler>
    </div>
    </form>
</body>
</html>

Default.aspx.cs
using System;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
 
using System.Data;
using System.Configuration;
using System.Web.Security;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Telerik.Web.UI;
 
public partial class Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!this.IsPostBack)
        {
            this.RadScheduler1.SelectedDate = DateTime.Now;
            this.RadScheduler1.SelectedView = SchedulerViewType.MonthView;
            this.RadScheduler1.DayView.DayStartTime = new TimeSpan(5, 0, 0);
            this.RadScheduler1.DayView.DayEndTime = new TimeSpan(24, 0, 0);
 
            XmlSchedulerProvider provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), false);
            RadScheduler1.Provider = provider;
 
        }
    }
 
 
    protected void AppointmentDataBound(object sender, SchedulerEventArgs e)
    {
        e.Appointment.CssClass = e.Appointment.Attributes["AppointmentType"];
    }
 
    protected void RadScheduler1_AppointmentClick(object sender, SchedulerEventArgs e)
    {
        if (e.Appointment.Attributes["URL"].Length > 0)
            Response.Redirect(e.Appointment.Attributes["URL"]);
    }
}

Appointments.xml: (stored in App_Data)
<?xml version="1.0" encoding="utf-8"?>
<Appointments>
    <Appointment>
        <ID>1</ID>
        <Subject>Fall Program Ads</Subject>
    <Description>Selling the ads for the fall programs to businesses and personal.</Description>
        <Start>2011-06-22T00:00</Start>
        <End>2011-08-01T23:59</End>
 
    <AllDayEvent>1</AllDayEvent>
    <Attribute Key="URL" Value="~/ProgramAds.aspx" />
    <Attribute Key="AppointmentType" Value="sales" />
    </Appointment>
    <Appointment>
        <ID>2</ID>
        <Subject>Pancake Breakfast</Subject>
    <Description>Click for more...</Description>
        <Start>2011-07-09T06:30Z</Start>
        <End>2011-07-09T07:30Z</End>
    <Attribute Key="URL" Value="~/PancakeBreakfast.aspx" />
    <Attribute Key="AppointmentType" Value="fundraiser" />
    </Appointment>
    <Appointment>
        <ID>3</ID>
        <Subject>Draw Down</Subject>
    <Description>Click for more...</Description>
    <Start>2011-07-11T17:30Z</Start>
    <End>2011-07-11T19:30Z</End>
    <Attribute Key="URL" Value="~/DrawDown.aspx" />
    <Attribute Key="AppointmentType" Value="fundraiser" />
    </Appointment>
  <Appointment>
    <ID>4</ID>
    <Subject>Football Camp</Subject>
    <Description>Camp for PCRA football players</Description>
    <Start>2011-07-25T08:00:00.000</Start>
    <End>2011-07-29T13:00:00.000</End>
    <Attribute Key="URL" Value="~/Football.aspx" />
    <Attribute Key="AppointmentType" Value="football" />
  </Appointment>
  <Appointment>
    <ID>5</ID>
    <Subject>Football Game</Subject>
    <Description>@ West Limestone</Description>
    <Start>2011-08-04T19:00:00.000</Start>
    <End>2011-08-04T22:00:00.000</End>
    <Attribute Key="URL" Value="~/Football.aspx" />
    <Attribute Key="AppointmentType" Value="game" />
  </Appointment>
   
  <Appointment>
    <ID>6</ID>
    <Subject>General Meeting</Subject>
    <Description>All members encouraged to attend to hear where our programs are at.  All meetings are held at the Priceville High School cafeteria.</Description>
    <Start>2011-07-19T20:00</Start>
    <End>2011-07-19T21:00</End>
    <RecurrenceRule>
      <![CDATA[
            DTSTART:20110719T200000Z
            DTEND:20110719T210000Z
            RRULE:FREQ=MONTHLY;INTERVAL=1;BYSETPOS=3;BYDAY=TU
            ]]>
    </RecurrenceRule>
    <Attribute Key="URL" Value="" />
    <Attribute Key="AppointmentType" Value="general" />
  </Appointment>
 
 
  <Appointment>
    <ID>7</ID>
    <Subject>Car Show</Subject>
    <Description>Click for more...</Description>
    <Start>2011-08-20T13:00</Start>
    <End>2011-08-20T22:00</End>
    <Attribute Key="URL" Value="~/CarShow.aspx" />
    <Attribute Key="AppointmentType" Value="fundraiser" />
  </Appointment>
</Appointments>


Thanks in advance,
Lee
0
Accepted
Peter
Telerik team
answered on 18 Jul 2011, 03:57 PM
Hi Lkeel,

The problem was that you set the provider conditionally in Page_Load. The Provider should be set in Page_Init
protected override void OnInit(EventArgs e)
   {
       base.OnInit(e);
       RadScheduler1.Provider = new XmlSchedulerProvider(Server.MapPath("~/App_Data/Appointments.xml"), true);
   }


Regards,
Peter
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Asked by
lkeel
Top achievements
Rank 1
Answers by
Veronica
Telerik team
lkeel
Top achievements
Rank 1
Peter
Telerik team
Share this question
or