I have a RadScheduler on a page and when I try to delete an appointment by either clicking on the little red cross, or right click on the appointment and select delete from the context sensitive menu I get a javascript error in the Telerik javascript generated code saying
This is happening at the confirm delete check in the code
I have checked the value of this.get_element().id and it is returning "RadScheduler1"
Is this a bug in the telerik code or have I done something that would cause this?
My Scheduler is set up as follows and I am using the version from Q2 2010 under ASP.Net 3.5
Stuart Watton
10 Answers, 1 is accepted
We are not aware of such issue and we also cannot replicate it with the code you sent us. Please, open a support ticket and send us a simple working demo which we can test locally.
Thanks.
Peter
the Telerik team
We haven't been able to replicate the problem locally. If anyone has a sample of the issue, feel free to send it to us via a support ticket and we will look into it.
Regards,
Peter
the Telerik team
I am able to replicated this in the latest builds. Currently I am using 2011.2.712.35. I was able to reproduce this in the latest internal build as well.
Here is the code:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm3.aspx.vb" Inherits="ERP.OM.Web.WebForm3" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<
html
xmlns
=
"http://www.w3.org/1999/xhtml"
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
div
>
<
telerik:RadScriptManager
ID
=
"ScriptManagerMain"
runat
=
"server"
ScriptMode
=
"Release"
>
<
CompositeScript
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Assembly
=
"ERP.Common"
Name
=
"ERP.Common.jquery.1.4.1.min.js"
/>
</
Scripts
>
</
CompositeScript
>
</
telerik:RadScriptManager
>
<
telerik:RadAjaxManager
ID
=
"RadAjaxManagerMain"
runat
=
"server"
>
</
telerik:RadAjaxManager
>
<
telerik:RadAjaxManagerProxy
ID
=
"rampSchedule"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"rsMain"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rsMain"
/>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManagerProxy
>
<
telerik:RadScheduler
runat
=
"server"
ID
=
"rsMain"
DataEndField
=
"EndDate"
DataStartField
=
"StartDate"
OverflowBehavior
=
"Expand"
EnableDescriptionField
=
"true"
DataSourceID
=
"odsSchedule"
DataSubjectField
=
"Subject"
AllowDelete
=
"false"
DataRecurrenceField
=
"RecurrenceRule"
DataRecurrenceParentKeyField
=
"RecurrenceParentID"
DataDescriptionField
=
"Notes"
DataKeyField
=
"ScheduleID"
>
</
telerik:RadScheduler
>
<
asp:ObjectDataSource
runat
=
"server"
ID
=
"odsSchedule"
TypeName
=
"ERP.CRM.BL.Schedules"
SelectMethod
=
"GetAllSchedules"
></
asp:ObjectDataSource
>
</
div
>
</
form
>
</
body
>
</
html
>
And the code behind, well it contains the function to update my db. so you may have to replace it with something else.
Public
Class
WebForm3
Inherits
System.Web.UI.Page
Private
Sub
rsMain_AppointmentCreated(sender
As
Object
, e
As
Telerik.Web.UI.AppointmentCreatedEventArgs)
Handles
rsMain.AppointmentCreated
e.Appointment.AllowDelete =
True
End
Sub
Private
Sub
rsMain_AppointmentDelete(sender
As
Object
, e
As
Telerik.Web.UI.AppointmentDeleteEventArgs)
Handles
rsMain.AppointmentDelete
Schedules.DeleteSchedule(
CInt
(e.Appointment.ID))
End
Sub
Private
Sub
rsMain_AppointmentInsert(sender
As
Object
, e
As
Telerik.Web.UI.AppointmentInsertEventArgs)
Handles
rsMain.AppointmentInsert
Dim
dict
As
New
Dictionary(Of
String
,
Object
)
dict.Add(
"Subject"
, e.Appointment.Subject)
dict.Add(
"StartDate"
, e.Appointment.Start)
dict.Add(
"EndDate"
, e.Appointment.
End
)
dict.Add(
"Notes"
, e.Appointment.Description)
Schedules.InsertSchedule(dict)
End
Sub
Private
Sub
rsMain_AppointmentUpdate(sender
As
Object
, e
As
Telerik.Web.UI.AppointmentUpdateEventArgs)
Handles
rsMain.AppointmentUpdate
Dim
dict
As
New
Dictionary(Of
String
,
Object
)
dict.Add(
"Subject"
, e.ModifiedAppointment.Subject)
dict.Add(
"StartDate"
, e.ModifiedAppointment.Start)
dict.Add(
"EndDate"
, e.ModifiedAppointment.
End
)
dict.Add(
"Notes"
, e.ModifiedAppointment.Description)
Schedules.UpdateSchedule(
CInt
(e.ModifiedAppointment.ID), dict)
End
Sub
End
Class
The errors that I get:
Error: $telerik.$.modal is not a
function
Source File: http:
//localhost:5001/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ScriptManagerMain_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a111e8464-2436-44db-9b34-0d84ed5253c8%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2011.2.712.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a326e32e2-cd52-462c-ba2c-db5128e4371b%3a16e4e7cd%3aed16cbdc%3af7645509%3a24ee1bba%3a4c8be21a%3af46195d3%3a874f8ea2%3a650fdad%3ad40f7d5c%3ae91ff703%3a7666c7ed%3aa51ee93e%3a59462f1
Line: 5128
I get the error even when I try to move the appoinment.
I already answered in ticket #460181. I suggest that we continue the conversation in the Support Ticket.
Greetings,
Veronica Milcheva
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I have the same Problem. What was the solution?
Kind regards,
Markus
The reason why you get this error is because you are using composite script when registering the controls in the RadScriptManager. By some reason this fails the javascript of the RadScheduler. You need to use standard scripts instead of combined ones:
<
telerik:RadScriptManager
ID
=
"ScriptManagerMain"
runat
=
"server"
ScriptMode
=
"Release"
>
<
Scripts
>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.Core.js"
/>
<
asp:ScriptReference
Assembly
=
"Telerik.Web.UI"
Name
=
"Telerik.Web.UI.Common.jQuery.js"
/>
<
asp:ScriptReference
Path
=
"~/Scripts/jquery-1.4.1.min.js"
/>
</
Scripts
>
</
telerik:RadScriptManager
>
Well, at least that was the issue in mine. Difficult to comment without seeing your code.
thanks for the quick answer! It did not solve the Problem for me. Here is my code:
<telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableScriptGlobalization="true">
<Scripts>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js"></asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js"></asp:ScriptReference>
<asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js"></asp:ScriptReference>
</Scripts>
</telerik:RadScriptManager>
<telerik:RadStyleSheetManager ID="RadStyleSheetManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="Content">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="Content" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<asp:Panel runat="server" ID="Content"
/>
and than I create the scheduler in Code behind like this and add it to the Content Panel:
private RadScheduler _scheduler;
public TelerikScheduleBuilder(string id, int width, int height) {
_scheduler = new RadScheduler();
_scheduler.ID = id;
_scheduler.Skin = "Telerik";
_scheduler.Width = width;
_scheduler.Height = height;
_scheduler.SelectedView = SchedulerViewType.WeekView;
_scheduler.SelectedDate = DateTime.Now;
_scheduler.WorkDayStartTime = TimeSpan.FromHours(5);
_scheduler.WorkDayEndTime = TimeSpan.FromHours(18);
_scheduler.FirstDayOfWeek = DayOfWeek.Monday;
//_scheduler.DisplayDeleteConfirmation = false;
//_scheduler.TimeZoneOffset = TimeSpan.FromHours(1);
_scheduler.Culture = CultureInfo.CreateSpecificCulture("de-DE");
_scheduler.StartEditingInAdvancedForm = true;
_scheduler.EnableDescriptionField = true;
_scheduler.OverflowBehavior = OverflowBehavior.Auto;
_scheduler.AppointmentStyleMode = AppointmentStyleMode.Default;
_scheduler.AllowDelete = true;
_scheduler.AdvancedForm.Modal = true;
_scheduler.WebServiceSettings.Path = "SchedulerWebService.asmx";
_scheduler.TimeSlotContextMenuSettings.EnableDefault = true;
_scheduler.AppointmentContextMenuSettings.EnableDefault = true;
}
public TelerikScheduleBuilder AddToContent(Control content) {
content.Controls.Add(_scheduler);
return this;
}
(Well the same Problem occurs if I create a new Project with the Telerik Scenario Wizards...???)
Nice greetings, Markus
The solution is to add the following lines in Web.Config: when using the Telerik Scheduler Control.
<configuration>
<appSettings>
<add key="ValidationSettings:UnobtrusiveValidationMode" value="None"/>
</appSettings>
......
Kind regards and have fun with telerik,
Markus