Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
110 views
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 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
KobusVisagie
Top achievements
Rank 1
 answered on 17 Nov 2010
5 answers
145 views
Hi,

when an user double-click my radScheduler, a simple inline form appears and he needs to click "Options" to see Advanced version, where he can select a room and resources.

Can I change that behavior to use Advanced form as default?

TIA,

Rubens
Lucien
Top achievements
Rank 2
 answered on 17 Nov 2010
1 answer
175 views
Hello,

we are currently evaluating the brand new RadScheduler for Asp.net Ajax Q3 2010.
I set  StartEditingInAdvancedForm="true" and StartInsertingInAdvancedForm="true" then went in debug mode.
I doubled clicked on an empty space to show the "AdvancedInsertTemplate" form,
it showed up, i entered some text inside the Subject textfield then pressed saved.
I put a break point at the server method "RadScheduler1_AppointmentCommand" and expected to see
e.CommandName set to "Insert"
but unfortunately for me, i was surprised to see that
e.CommandName was set to "update" !!!

Any Idea??? We tried and tried again, no clue.
We just realised that, when StartEditingInAdvancedForm  and StartInsertingInAdvancedForm are set to "false", then e.CommandName is set to "Insert", when clicking on an empty  place, and set to "update" when clicking on an filled placed.

Please, it's urgent, we really want to know if we should use Radscheduler for our business logic.

Thank you in advance for any hint!
Lucien

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server"
        HorizontalAlign="NotSet" LoadingPanelID="RadAjaxLoadingPanel1" >
        <telerik:RadScheduler ID="RadScheduler1" runat="server"
            DataDescriptionField="Description" DataEndField="End" DataKeyField="ID"
            DataRecurrenceField="RecurrenceRule"
            DataRecurrenceParentKeyField="RecurrenceParentID" DataReminderField="Reminder"
            DataSourceID="LinqDataSource1" DataStartField="Start" DataSubjectField="Subject"
            EnableDescriptionField="True" Skin="Office2007"
            AdvancedForm-Modal="false"
            EnableExactTimeRendering="True"
            Height="100%"            
            StartEditingInAdvancedForm="true"
            StartInsertingInAdvancedForm="true"            
            OnAppointmentCommand="RadScheduler1_AppointmentCommand"
            OnFormCreated="RadScheduler1_FormCreated"                         
            >
.......
</telerik:RadAjaxPanel >
Lucien
Top achievements
Rank 2
 answered on 17 Nov 2010
1 answer
67 views

Non of the managers will loading sub folders, and there is nothing in the event log to indicate what is going on

Dobromir
Telerik team
 answered on 17 Nov 2010
3 answers
771 views
I need to change the default font size in the radEditor and I'm not having success. This will be for both edit and non-edit modes.
Does anybody know how to do this? Currently the font is size 11px but I want it bigger when the user initially clicks into the editor.

For the surrounding asp controls I have simply applied a style with the font size
style="font-size:medium; font-weight:bold"

Is there a similar style that will work in the radEditor?

I've also tried using a CSSClass directing it to use this
.tempstyle {font-family: Tahoma; font-size: 20px !important; color: green;}

My site uses a single style sheet but no themes.

Any help is appreciated.
Rumen
Telerik team
 answered on 17 Nov 2010
0 answers
87 views
Dear Sir,
when i open appointment context menu using left menu then OnClientAppointmentContextMenu this event is not firing why?
Please help me.

Following Code responsible for Open Appointment Context Menu through Left Click.

function OnClientAppointmentClick(sender, args) {
            sender.get_appointmentContextMenus()[0].show(args.get_domEvent());
         
        }

But following client event is not firing

function OnClientAppointmentContextMenu(sender, args) {

          
        var app = args.get_appointment();
            var attValue = app.get_attributes().getAttribute('StatusId');
            //alert(attValue);
                if (attValue == "0") {
                    sender.get_appointmentContextMenus()[0].set_enabled(false);
                }
                else {
                    sender.get_appointmentContextMenus()[0].set_enabled(true);
                }

        }

So please Help Me.
Thanks
Chandan Kumar
Chandan Kumar
Top achievements
Rank 1
 asked on 17 Nov 2010
1 answer
88 views
Hi all,
i am facing a weird behavior with radalert control. in IE, it behaves normally but in Firefox i get a blank alert. Here is the javascript call.
Anybody why it is happening??

I use radWindow.dll v2.0.50727 AND Mozilla 3.6 
function ShowErrorMessage(Message) {
         radalert(Message, 500, 210, "List Error Alert");
    }
Georgi Tunev
Telerik team
 answered on 17 Nov 2010
5 answers
55 views
Hello,
        I tried to use telerik online documentation, and it seems to be broken. All pages are blank. For example

http://www.telerik.com/help/aspnet-ajax/splitter_clientsideradpane.html

Thanks,
Bharani
Dobromir
Telerik team
 answered on 17 Nov 2010
3 answers
78 views
Let's say I have a grid inside and PadPanelItem.  Is it possible to set the grid height to fill 100% of that panel?

Thanks,

Richard.

Pavlina
Telerik team
 answered on 17 Nov 2010
1 answer
76 views
How do i add Delete and Edit images to RadGrid ?
Daniel
Telerik team
 answered on 17 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?