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

Recurring Apointments show recursion only after postback?

1 Answer 45 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ben
Top achievements
Rank 1
Ben asked on 22 Dec 2008, 06:19 PM
I'm not sure if the title is what the issue is but that's what i'm thinking. When the scheduler loads and i select "monthly" the initial dates don't show up until i go to the next month. Once i do see the dates they are showed as recurring but only by the recurring icon and not actually recurring on the scheduler. The kicker is that the appointments show up after i either edit then click cancel or delete one of the appointments shown...Heres a video to show you what im talking about. Not sure why it won't give the high res option.
Heres my code...
    Public Sub AddAppointments() 
        RadCal.Appointments.Clear() 
 
        Dim rd As SqlClient.SqlDataReader = Data.SqlHelper.ExecuteReader(ConnString, "dbo.JobSelect"
        While rd.Read 
 
            Dim range As New RecurrenceRange 
            range.Start = rd.GetDateTime(12) 
            range.EventDuration = rd.GetDateTime(13) - rd.GetDateTime(12) 
 
            Select Case rd.GetInt32(5) 
                Case 4 
                    Dim DailyRR As New DailyRecurrenceRule(rd.GetInt32(6), range) 
 
                    Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), DailyRR.ToString) 
                    RadCal.InsertAppointment(da) 
                    RadCal.DataKeyField = da.ID 
                    RadCal.DataStartField = da.Start 
                    RadCal.DataEndField = da.End 
                    RadCal.DataSubjectField = da.Subject 
                Case 8 
                    Dim WeeklyRR As New WeeklyRecurrenceRule(rd.GetInt32(10), rd.GetInt32(6), range) 
 
                    Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), WeeklyRR.ToString) 
                    RadCal.InsertAppointment(da) 
                    RadCal.DataKeyField = da.ID 
                    RadCal.DataStartField = da.Start 
                    RadCal.DataEndField = da.End 
                    RadCal.DataSubjectField = da.Subject 
                Case 16 
                    Dim MonthlyRR As New MonthlyRecurrenceRule(rd.GetInt32(6), rd.GetInt32(10), range) 
 
                    Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), MonthlyRR.ToString) 
                    RadCal.InsertAppointment(da) 
                    RadCal.DataKeyField = da.ID 
                    RadCal.DataStartField = da.Start 
                    RadCal.DataEndField = da.End 
                    RadCal.DataSubjectField = da.Subject 
                Case 32 
                    Dim MonthlyRelativeRR As New MonthlyRecurrenceRule(rd.GetInt32(9), rd.GetInt32(6), rd.GetInt32(10), range) 
 
 
 
                    Dim da As New Appointment(rd.GetInt32(0), rd.GetDateTime(12), rd.GetDateTime(13), rd.GetString(1), MonthlyRelativeRR.ToString) 
                    RadCal.InsertAppointment(da) 
                    RadCal.DataKeyField = da.ID 
                    RadCal.DataStartField = da.Start 
                    RadCal.DataEndField = da.End 
                    RadCal.DataSubjectField = da.Subject 
            End Select 
 
        End While 
        rd.Close() 
 
    End Sub 

1 Answer, 1 is accepted

Sort by
0
Ben
Top achievements
Rank 1
answered on 22 Dec 2008, 06:36 PM
Disregard this post...after tooling for hours i felt like this was the only thing i could do but sure enough i experimented with the NavigationComplete event and that seemed to resolve the issue i've been having.
Tags
Scheduler
Asked by
Ben
Top achievements
Rank 1
Answers by
Ben
Top achievements
Rank 1
Share this question
or