Hi
Can anyone please help me, i'm strugeling with this for a while now. i get this error when executing a piece of javascript
Error : Microsoft JScript runtime error: Object doesn't support this property or method
I am using the basic example in telerik tv to create the appointment, there is no problem up untill where i call the event "AppointmentContextClicked".
It throws an exception when it hits
Regards
Can anyone please help me, i'm strugeling with this for a while now. i get this error when executing a piece of javascript
Error : Microsoft JScript runtime error: Object doesn't support this property or method
I am using the basic example in telerik tv to create the appointment, there is no problem up untill where i call the event "AppointmentContextClicked".
It throws an exception when it hits
var selectedApt = eventArgs.Get_appointment().get_subject();
Source is below<%@ Page Title="" Language="C#" MasterPageFile="-----------------" AutoEventWireup="true" CodeBehind="---------------" Inherits="---------------------" %> <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> <asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="server"> <telerik:RadCodeBlock runat="server"> <script type="text/javascript"> //<![CDATA[ function AppointmentContextClicked(sender, eventArgs) { var selectedApt = eventArgs.Get_appointment().get_subject(); document.getElementById("Text1").value = selectedApt; } //]]> </script> </telerik:RadCodeBlock> <input id="Text1" type="text" /> <telerik:RadScheduler ID="RadScheduler1" runat="server" DataDescriptionField="Body" DataEndField="End" DataKeyField="IDDatabaseAppointments" DataSourceID="SchedularDS" DataStartField="Start" DataSubjectField="Subject" EnableDescriptionField="True" Height="" Skin="Windows7" DataReminderField="Reminder" OnAppointmentInsert="RadScheduler1_AppointmentInsert" EnableExactTimeRendering="true" AppointmentStyleMode="Default" AdvancedForm-Modal="true" OnClientAppointmentContextMenuItemClicked="AppointmentContextClicked"> <Reminders Enabled="True" /> <AppointmentContextMenuSettings EnableDefault="true" /> <AppointmentContextMenus> <telerik:RadSchedulerContextMenu> <Items> <telerik:RadMenuItem Text="Hello" /> </Items> </telerik:RadSchedulerContextMenu> </AppointmentContextMenus> <TimeSlotContextMenus> </TimeSlotContextMenus> </telerik:RadScheduler> <asp:SqlDataSource ID="SchedularDS" runat="server" ConnectionString="<%$ ConnectionStrings:Serv Environment %>" DeleteCommand="DELETE FROM [DatabaseAppointment] WHERE [IDDatabaseAppointments] = @IDDatabaseAppointments" InsertCommand="INSERT INTO [DatabaseAppointment] ([Subject], [Body], [Start], [End], [IsAllDayEvent], [Location], [Url], [Type], [RecurrencePattern], [TimeZoneString], [Developer], [Productline], [ExceptionAppointments], [Importance], [TimeMarker], [Category], [UserID], [Reminder], [PageType]) VALUES (@Subject, @Body, @Start, @End, @IsAllDayEvent, @Location, @Url, @Type, @RecurrencePattern, @TimeZoneString, @Developer, @Productline, @ExceptionAppointments, @Importance, @TimeMarker, @Category, @UserID, @Reminder, @PageType)" SelectCommand="Dairy_LoadSchedules" UpdateCommand="UPDATE [DatabaseAppointment] SET [Subject] = @Subject, [Body] = @Body, [Start] = @Start, [End] = @End, [IsAllDayEvent] = @IsAllDayEvent, [Location] = @Location, [Url] = @Url, [Type] = @Type, [RecurrencePattern] = @RecurrencePattern, [TimeZoneString] = @TimeZoneString, [Developer] = @Developer, [Productline] = @Productline, [ExceptionAppointments] = @ExceptionAppointments, [Importance] = @Importance, [TimeMarker] = @TimeMarker, [Category] = @Category, [UserID] = @UserID, [Reminder] = @Reminder, [PageType] = @PageType WHERE [IDDatabaseAppointments] = @IDDatabaseAppointments" SelectCommandType="StoredProcedure"> <DeleteParameters> <asp:Parameter Name="IDDatabaseAppointments" Type="Int32" /> </DeleteParameters> <InsertParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Body" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="End" Type="DateTime" /> <asp:Parameter Name="IsAllDayEvent" Type="Boolean" /> <asp:Parameter Name="Location" Type="String" /> <asp:Parameter Name="Url" Type="String" /> <asp:Parameter Name="Type" Type="Int32" /> <asp:Parameter Name="RecurrencePattern" Type="String" /> <asp:Parameter Name="TimeZoneString" Type="String" /> <asp:Parameter Name="Developer" Type="String" /> <asp:Parameter Name="Productline" Type="String" /> <asp:Parameter Name="ExceptionAppointments" Type="String" /> <asp:Parameter Name="Importance" Type="String" /> <asp:Parameter Name="TimeMarker" Type="String" /> <asp:Parameter Name="Category" Type="String" /> <asp:Parameter Name="UserID" Type="Decimal" /> <asp:Parameter Name="Reminder" Type="String" /> <asp:Parameter Name="PageType" Type="String" /> </InsertParameters> <SelectParameters> <asp:SessionParameter DefaultValue="0" Name="UserLevel" SessionField="ChartLevel" Type="Decimal" /> <asp:SessionParameter DefaultValue="0" Name="UserID" SessionField="UserID" Type="Decimal" /> <asp:QueryStringParameter DefaultValue="" Name="PageType" QueryStringField="Type" Type="String" /> </SelectParameters> <UpdateParameters> <asp:Parameter Name="Subject" Type="String" /> <asp:Parameter Name="Body" Type="String" /> <asp:Parameter Name="Start" Type="DateTime" /> <asp:Parameter Name="End" Type="DateTime" /> <asp:Parameter Name="IsAllDayEvent" Type="Boolean" /> <asp:Parameter Name="Location" Type="String" /> <asp:Parameter Name="Url" Type="String" /> <asp:Parameter Name="Type" Type="Int32" /> <asp:Parameter Name="RecurrencePattern" Type="String" /> <asp:Parameter Name="TimeZoneString" Type="String" /> <asp:Parameter Name="Developer" Type="String" /> <asp:Parameter Name="Productline" Type="String" /> <asp:Parameter Name="ExceptionAppointments" Type="String" /> <asp:Parameter Name="Importance" Type="String" /> <asp:Parameter Name="TimeMarker" Type="String" /> <asp:Parameter Name="Category" Type="String" /> <asp:Parameter Name="UserID" Type="Decimal" /> <asp:Parameter Name="Reminder" Type="String"></asp:Parameter> <asp:Parameter Name="PageType" Type="String" /> <asp:Parameter Name="IDDatabaseAppointments" Type="Int32" /> </UpdateParameters> </asp:SqlDataSource> </asp:Content> Regards