Hi,
I'm having problems with my Telerik RadScheduler.
Basically the appointments get databound fine, I have one resource (categories) and these used to be settable. But for some reason (I don't know what I did to cause this), now when I press the button on inserting or editing to go from basic to advanced form, the loading gif image appears but doesn't go away. If I take the RadAjaxLoadingPanel off, it loads the advanced form, which I can fill in and save. This allows me to insert a new appointment but doesn't exit the advanced form automatically. If I refresh the whole page the calendar loads and shows my event.
So it's fair to say I'm a bit confused.
Can anyone help please?
Here's the important bits of code (I've emptied the subs for appointmentdatabound, appointmentinsert etc to narrow down the problem):
I'm having problems with my Telerik RadScheduler.
Basically the appointments get databound fine, I have one resource (categories) and these used to be settable. But for some reason (I don't know what I did to cause this), now when I press the button on inserting or editing to go from basic to advanced form, the loading gif image appears but doesn't go away. If I take the RadAjaxLoadingPanel off, it loads the advanced form, which I can fill in and save. This allows me to insert a new appointment but doesn't exit the advanced form automatically. If I refresh the whole page the calendar loads and shows my event.
So it's fair to say I'm a bit confused.
Can anyone help please?
Here's the important bits of code (I've emptied the subs for appointmentdatabound, appointmentinsert etc to narrow down the problem):
Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerCancelEventArgs) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'save the appointment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim tempRadResources As ResourceCollection | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim tempRadResource As Resource | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim categoryID As Integer | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim categoryName As String | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim calendarID As Long = Val(ddl_calendars.selectedvalue) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Try | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tempRadResources = e.Appointment.Resources | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Try | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tempRadResource = tempRadResources.Item(0) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryID = tempRadResource.Key | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryName = tempRadResource.Text | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Catch ex As Exception | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
categoryID = 0 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
End Try | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim appStartDate As Date = e.Appointment.Start | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim appEndDate As Date = e.Appointment.End | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim appTitle As String = e.Appointment.Subject | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim appRecurrenceRule As String = e.Appointment.RecurrenceRule | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(0).DefaultValue = categoryID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(1).DefaultValue = 1 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(2).DefaultValue = appStartDate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(3).DefaultValue = appEndDate | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(4).DefaultValue = appTitle | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(5).DefaultValue = "" | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(6).DefaultValue = appRecurrenceRule | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
If e.Appointment.RecurrenceParentID = Nothing Then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(7).DefaultValue = Nothing | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ElseIf Val(e.Appointment.RecurrenceParentID) > 0 Then | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(7).DefaultValue = CLng(e.Appointment.RecurrenceParentID) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
End If | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
AppointmentsDataSource.InsertParameters(8).DefaultValue = calendarID | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
addedCalendarEvent = True | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Dim tempAppointment As Appointment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tempAppointment = New Appointment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tempAppointment = e.Appointment | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
RadScheduler1.InsertAppointment(tempAppointment) | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'e.Cancel = True ' bodge to clear the lingering edit box | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
'RadScheduler1.Rebind() | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Catch ex As Exception | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
End Try
|