Recurring Apointments show recursion only after postback?

2 posts, 0 answers
  1. Ben
    Ben avatar
    35 posts
    Member since:
    Dec 2008

    Posted 22 Dec 2008 Link to this post

    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 

  2. Ben
    Ben avatar
    35 posts
    Member since:
    Dec 2008

    Posted 22 Dec 2008 Link to this post

    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.
Back to Top