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

RadAjaxLoadingPanel not disappearing on advanced form load

2 Answers 139 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
MCM Net
Top achievements
Rank 1
MCM Net asked on 23 Jan 2009, 01:51 PM
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):

Protected Sub RadScheduler1_AppointmentInsert(ByVal sender As ObjectByVal 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

<asp:ScriptManager ID="ScriptManager1" runat="server" /> 
 
                <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
                    <AjaxSettings> 
                        <telerik:AjaxSetting AjaxControlID="RadScheduler1"
                            <UpdatedControls> 
                                <telerik:AjaxUpdatedControl ControlID="RadScheduler1" /> 
                            </UpdatedControls> 
                        </telerik:AjaxSetting> 
                    </AjaxSettings> 
                </telerik:RadAjaxManager> 
                <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
                    <telerik:RadScheduler ID="RadScheduler1" runat="server" Width="750px" Skin="Hay" 
                        EnableEmbeddedSkins="True" SelectedDate="2009-01-21" DayStartTime="08:00:00" 
                        DayEndTime="19:00:00" DataSourceID="AppointmentsDataSource" DataKeyField="calendar_event_id" 
                        DataSubjectField="calendar_event_subject" DataStartField="calendar_event_start_date" 
                        DataEndField="calendar_event_end_date" DataRecurrenceField="calendar_event_recurrence_rule" 
                        DataRecurrenceParentKeyField="calendar_event_recurrence_parent_id" TimeZoneOffset="00:00:00" 
                        OnAppointmentInsert="RadScheduler1_AppointmentInsert" OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" 
                        OnAppointmentUpdate="RadScheduler1_AppointmentUpdate"
                        <ResourceTypes> 
                            <telerik:ResourceType ForeignKeyField="calendar_event_category_name" Name="Category" 
                                KeyField="calendar_event_category_id" TextField="calendar_event_category_name" 
                                DataSourceID="categoryDataSource" /> 
                        </ResourceTypes> 
                    </telerik:RadScheduler> 
                </telerik:RadAjaxPanel> 
                <asp:SqlDataSource ID="AppointmentsDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AJAXdbConnectionString %>" 
                    CancelSelectOnNullParameter="True" SelectCommand="SELECT * FROM view_calendar_events WHERE calendar_id = @calendar_id" 
                    InsertCommand="EXECUTE sp_insertCalendarEventAndLink @calendar_event_category_id,@calendar_event_operator_id,@calendar_event_start_date,@calendar_event_end_date,@calendar_event_subject,@calendar_event_notes,@calendar_event_recurrence_rule,@calendar_event_recurrence_parent_id,@calendarID" 
                    UpdateCommand="UPDATE calendar_events SET calendar_event_category_id = @calendar_event_category_id, calendar_event_operator_id = @calendar_event_operator_id, calendar_event_start_date = @calendar_event_start_date, calendar_event_end_date = @calendar_event_end_date, calendar_event_subject = @calendar_event_subject, calendar_event_notes = @calendar_event_notes, calendar_event_recurrence_rule = @calendar_event_recurrence_rule, calendar_event_recurrence_parent_id = @calendar_event_recurrence_parent_id WHERE calendar_event_id = @appointmentID" 
                    > 
                    <SelectParameters> 
                        <asp:Parameter Name="calendar_id" Type="Int32" /> 
                    </SelectParameters> 
                    <InsertParameters> 
                        <asp:Parameter Name="calendar_event_category_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_operator_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_start_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_end_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_subject" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_notes" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_rule" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_parent_id" Type="Int64" Direction="Input" /> 
                        <asp:Parameter Name="calendarID" Type="Int64" Direction="Input" /> 
                    </InsertParameters> 
                    <UpdateParameters> 
                        <asp:Parameter Name="calendar_event_category_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_operator_id" Type="Int32" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_start_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_end_date" Type="DateTime" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_subject" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_notes" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_rule" Type="String" Direction="Input" /> 
                        <asp:Parameter Name="calendar_event_recurrence_parent_id" Type="Int64" Direction="Input" /> 
                        <asp:Parameter Name="appointmentID" Type="Int64" Direction="Input" /> 
                    </UpdateParameters> 
                </asp:SqlDataSource> 
                <asp:SqlDataSource ID="categoryDataSource" runat="server" ConnectionString="<%$ ConnectionStrings:AJAXdbConnectionString %>" 
                    SelectCommand="SELECT * FROM calendar_event_category"></asp:SqlDataSource> 

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 26 Jan 2009, 11:06 AM
Hi Steven,

The only unusual thing I noticed about your code is that you are using both RadAjaxManager and RadAjaxPanel to ajaxify RadScheduler. You only need one of these controls - either RadAjaxManager or
RadAjaxPanel. Please, remove one of these controls and let us know if this helps.
 
If the problem still persists, please open a support ticket and send us a working demo which we can test locally.


Greetings,
Peter
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
MCM Net
Top achievements
Rank 1
answered on 26 Jan 2009, 11:52 AM
Worked a treat, thank you very much!
Tags
Scheduler
Asked by
MCM Net
Top achievements
Rank 1
Answers by
Peter
Telerik team
MCM Net
Top achievements
Rank 1
Share this question
or