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

[Solved] Problems with recurring appointments

3 Answers 225 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Inge Wandsvik
Top achievements
Rank 1
Inge Wandsvik asked on 04 Jun 2008, 06:48 AM
Im having a strange problem with recurring appointments. If I select DAY view, and ad a recurring appoinment that will occur every second hour, and set no end date, it shows correctly on that day, but when I swith to Week view or Month view, the recurring appointment does not show. The same happens if I select Week view. If I ad a recurring appointment that will occur every day or every hour, the recurring appointment does only appear on the selected week.

The RecurrenceRule looks like this in the database:
DTSTART:20080602T0700000Z
DTEND:20080602T0800000Z
RRULE:FREQ=DAILY;INTERVAL=1;BYDAY=MO,TU,WE,TH,FR
EXDATE:20080604T0700000Z,20080603T0700000Z

The strangest this is that if i choose Month view, and ad an appointment on a day where a recurrent appointment have been added but doesn't show, it suddenly shows.

Have I missd something?

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Jun 2008, 11:44 AM
Hello Inge,

Could you please provide more details and the exact steps needed to observe this problem. Our local tests show that everything works as expected. Can you recreate the problem in our online examples?


Regards,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Inge Wandsvik
Top achievements
Rank 1
answered on 06 Jun 2008, 08:14 AM
I can not recreate the problem in the online examples. It seems to me it has something to do with rendering the Scheduler, since appointments show up if I chose to ad a new one, or delete an existing. Here is my Insert, Update and Delete code:
    Private Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentInsert  
 
        If Not Len(e.Appointment.Subject) > 0 Then  
            e.Cancel = True 
            Exit Sub  
        End If  
 
        Dim myVal As New ModuleItem 'This is our own class, since it's to be used in an intranet  
        Dim ModuleTypeId As Integer = ModuleSettings.ModuleTypeId  
        Dim ModuleId As Integer = ModuleSettings.ModuleId  
 
        Try  
            myVal.Title = e.Appointment.Subject  
            myVal.PageID = ModuleSettings.PageId  
            myVal.StartDate = e.Appointment.Start  
            myVal.EndDate = e.Appointment.End  
            myVal.Recur = e.Appointment.RecurrenceRule  
            myVal.RecurParent = e.Appointment.RecurrenceParentID  
            myVal.RecurState = e.Appointment.RecurrenceState  
            myVal.Annotations = "" 
            myVal.CreatedById = Nokas.Intranett.ADController.USERID  
            myVal.CreatedByName = Nokas.Intranett.ADController.USERFULLNAME  
            DataManager.putItem(myVal, ModuleId, ModuleTypeId) 'Inserts data useing StoredProcedure  
        Catch ex As Exception  
            Me.lblException.Text = ex.Message & "<br />" & ex.StackTrace  
        Finally  
            getAppointments()  
        End Try  
 
    End Sub 'RadScheduler1_AppointmentInsert  
 
    Private Sub getAppointments()  
 
        Dim myPageId As Integer = ModuleSettings.PageId  
        Dim myModuleId As Integer = ModuleSettings.ModuleId  
 
        Dim userCultureInfo As String = BrowserLanguage.ToString  
 
        Try  
            Me.RadScheduler1.DataSource = DataManager.GetItems(myPageId, myModuleId)  
            Me.RadScheduler1.SelectedDate = getToday()  
            Me.RadScheduler1.Culture = New CultureInfo(userCultureInfo)  
            Me.RadScheduler1.DataBind()  
        Catch ex As Exception  
            Me.lblException.Text = ex.Message & "<br />" & ex.StackTrace  
        End Try  
 
    End Sub 'getAppointments  
 
    Private Sub RadScheduler1_AppointmentUpdate(ByVal sender As Object, ByVal e As Telerik.Web.UI.AppointmentUpdateEventArgs) Handles RadScheduler1.AppointmentUpdate  
 
        If Not Len(e.Appointment.Subject) > 0 Then  
            e.Cancel = True 
            Exit Sub  
        End If  
 
        Dim myVal As New ModuleItem  
        Dim ModuleTypeId As Integer = ModuleSettings.ModuleTypeId  
        Dim ModuleId As Integer = ModuleSettings.ModuleId  
 
        Try  
            myVal.ItemId = e.ModifiedAppointment.ID  
            myVal.Title = e.ModifiedAppointment.Subject  
            myVal.PageID = ModuleSettings.PageId  
            myVal.StartDate = e.ModifiedAppointment.Start  
            myVal.EndDate = e.ModifiedAppointment.End  
            myVal.Recur = e.ModifiedAppointment.RecurrenceRule  
            myVal.RecurParent = e.ModifiedAppointment.RecurrenceParentID  
            myVal.RecurState = e.ModifiedAppointment.RecurrenceState  
            myVal.Annotations = "" 
            myVal.ModifiedById = Nokas.Intranett.ADController.USERID  
            myVal.ModifiedByName = Nokas.Intranett.ADController.USERFULLNAME  
            DataManager.updateItem(myVal, ModuleId, ModuleTypeId)  
        Catch ex As Exception  
            Me.lblException.Text = ex.Message & "<br />" & ex.StackTrace  
        Finally  
            getAppointments()  
        End Try  
 
    End Sub 'RadScheduler1_AppointmentUpdate  
 
    Private Sub RadScheduler1_AppointmentDelete(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) Handles RadScheduler1.AppointmentDelete  
 
        Dim myVal As New ModuleItem  
 
        Try  
            myVal.ItemId = e.Appointment.ID  
            DataManager.deleteItem(myVal)  
        Catch ex As Exception  
            Me.lblException.Text = ex.Message & "<br />" & ex.StackTrace  
        Finally  
            getAppointments()  
        End Try  
 
    End Sub 'RadScheduler1_AppointmentDelete 

Here is my Scheduler:
        <telerik:RadScheduler runat="server"   
            ID="RadScheduler1" 
            Skin="Office2007" 
            Width="750px"   
            SelectedView="WeekView" 
            TimeZoneOffset="01:00:00" 
            DayStartTime="07:00:00"   
            DayEndTime="23:59:59"   
            AllowDelete="true" 
            AllowEdit="true" 
            AllowInsert="true" 
            EnableResourceEditing="false" 
            FirstDayOfWeek="Monday" 
            LastDayOfWeek="Sunday" 
            MinutesPerRow="30" 
            StartEditingInAdvancedForm="true" 
            StartInsertingInAdvancedForm="true" 
            WorkDayEndTime="16:00:00" 
            WorkDayStartTime="08:00:00" 
            DataEndField = "EndDate" 
            DataStartField = "StartDate" 
            DataSubjectField = "Title" 
            DataRecurrenceField = "Recur" 
            DataRecurrenceParentKeyField = "RecurParent" 
            DataKeyField="ItemId" 
            Height="625px">  
            <WeekView HeaderDateFormat="dd.MM" /> 
            <TimelineView UserSelectable="false" /> 
        </telerik:RadScheduler> 
    </telerik:RadPageView> 
0
Inge Wandsvik
Top achievements
Rank 1
answered on 06 Jun 2008, 10:33 AM
My bad. I found the solution now... I had to call the getAppointment() method also from within NavigationCommand and NavigationComplete. Doing a ReBind of the RadScheduler was not enough...
Tags
Scheduler
Asked by
Inge Wandsvik
Top achievements
Rank 1
Answers by
Peter
Telerik team
Inge Wandsvik
Top achievements
Rank 1
Share this question
or