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

Problem with AppointmentTemplate and Script Error

6 Answers 46 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
kencox
Top achievements
Rank 1
kencox asked on 25 Aug 2010, 03:57 AM
I'm trying to add a hyperlink and custom text to the AppointmentTemplate but getting a Javascript error. Here's the template markup:

<AppointmentTemplate>
    <div class="rsCustomAppointmentContainer">
        <a href="finance.aspx">
            <%# Eval("FinancialLink.Text")%></a>
        <div>
        </div>
    </div>
</AppointmentTemplate>
<ResourceTypes>
    <telerik:ResourceType KeyField="FinancialLogID" Name="FinancialLink" 
    TextField="FinancialLogNumber"
        ForeignKeyField="FinancialLogID" DataSourceID="EntityDataSource3" />
</ResourceTypes>

Here's the script error:

}var m=this.getAppointmentDomElement(n.eventMapTarget);
var j=this.getAppointmentFromDomElement(m);
var l=(j.get_allowDelete()!=null)?j.get_allowDelete():this.get_allowDelete();

Could someone pointing me in the right direction? Ideally, I want to build a hyperlink that includes query string parameters. The full Scheduler code is at the very end.

Thanks,

Ken


<telerik:RadScheduler ID="RadScheduler2" runat="server" DataEndField="DateEntered"
    DataKeyField="FinancialLogID" Height="558px" DataStartField="DateEntered" EnableEmbeddedSkins="true"
    EnableViewState="true" DataSourceID="EntityDataSource3" StartEditingInAdvancedForm="false"
    DataSubjectField="FinancialLogNumber" HoursPanelTimeFormat="htt" Skin="Web20"
    ValidationGroup="RadScheduler1" ShowFooter="true" SelectedView="MonthView" Width="670px"
    ShowFullTime="true" RowHeight="23px" AllowDelete="False" AllowInsert="False"
    Visible="False">
<AppointmentTemplate>
<div class="rsCustomAppointmentContainer">
<a href="finance.aspx">
<%# Eval("FinancialLink.Text")%></a>
<div>
</div>
</div>
</AppointmentTemplate>
<ResourceTypes>
<telerik:ResourceType KeyField="FinancialLogID" Name="FinancialLink" 
TextField="FinancialLogNumber"
ForeignKeyField="FinancialLogID" DataSourceID="EntityDataSource3" />
</ResourceTypes>
    <WeekView HeaderDateFormat="dd MMM yy" />
    <MonthView HeaderDateFormat="MMM yy" />
    <DayView HeaderDateFormat="dddd, MMM d, yy" />
    <TimelineView UserSelectable="false" />
</telerik:RadScheduler>

6 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 25 Aug 2010, 04:30 PM
Hello Ken,

Can you please try the following and let me know if it helps:

<AppointmentTemplate
  <div class="rsCustomAppointmentContainer"
    <a href="finance.aspx">
      <%#Container.Appointment.Resources.GetResourceByType("FinancialLink").Text%>
    </a
   <div
   </div
</div
</AppointmentTemplate


All the best,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
kencox
Top achievements
Rank 1
answered on 25 Aug 2010, 05:50 PM
Hi Peter,

Thanks for your response. Unfortunately, I get the same error as before.

Ken
0
Peter
Telerik team
answered on 27 Aug 2010, 04:00 PM
Hello Ken,

Attached is a demo that works as expected. Let me know if there is anything different at your side.


Regards,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
kencox
Top achievements
Rank 1
answered on 27 Aug 2010, 06:00 PM
Hi Peter,

Thanks for the sample.

I found the problem. I have a slightly customized version of the Web20 skin that was created some time ago.

It looks like the script was looking for something within a later version of the default skin but not finding it within my custom version.

I'll have to run a compare to see what's changed.

Thanks again,

Ken
0
S
Top achievements
Rank 1
answered on 18 Aug 2012, 07:04 AM
Hello peter,

I am using the same code that you have mentioned.
But it opens in a dropdown in Appointment popup.
How to set Enable Text Selection for that dropdown?
0
Peter
Telerik team
answered on 20 Aug 2012, 03:07 PM
Hello,

If you need to allow custom text selection, you need to use custom attributes instead of resources. Here is a kb article that will help you implement this - http://www.telerik.com/support/kb/aspnet-ajax/scheduler/implement-related-radcombobox-controls-in-the-advanced-form.aspx.

All the best,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Scheduler
Asked by
kencox
Top achievements
Rank 1
Answers by
Peter
Telerik team
kencox
Top achievements
Rank 1
S
Top achievements
Rank 1
Share this question
or