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

How to make DataSubjectField as a HyperLink

3 Answers 61 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Venkata
Top achievements
Rank 1
Venkata asked on 08 Apr 2010, 05:15 PM
Hi,
i am using Telerik.Web.UI version (2009.2.826.35)
i have RadScheduler on my webform.
 i would like make DataSubjectField as like a hyperlink which will open new Test.aspx form.
i want to call my Javascript function to open that form and i need to pass id to that function.

<telerik:RadScheduler ID="RadScheduler1" runat="server" SelectedView="TimelineView" Height="100px" ShowNavigationPane="false" AllowInsert="false" AllowEdit="false" AllowDelete="false" 
          DataKeyField="id" DataStartField="sortdate" DataEndField="displaydate" DataSubjectField"text" OverflowBehavior="Expand" ShowViewTabs="false" ColumnWidth="250px">  
     </telerik:RadScheduler> 

function openWin(id) 
{    
    var url = document.location.protocol  + "//" + document.location.host + '/Test.aspx?' + '&id' + id;  
    var openedWin = window.open(url); 
    openedWin.focus(); 


how do i make this one?

3 Answers, 1 is accepted

Sort by
0
Dimitar Milushev
Telerik team
answered on 08 Apr 2010, 07:19 PM
Hello Venkata Maddineni,

Using the Templates functionality of RadScheduler you can render arbitrary controls / HTML inside the Appointments.

Kind regards,
Dimitar Milushev
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
Venkata
Top achievements
Rank 1
answered on 08 Apr 2010, 07:25 PM
umm..

I don't see example to pass ID value to my javascript.
could you give the real example.?
0
Venkata
Top achievements
Rank 1
answered on 08 Apr 2010, 09:25 PM
i did following changes and working fine
i have added CustomAttributeNames="id" property to RadScheduler
 and added this code

<AppointmentTemplate>  
<href="javascript:openDocWin('<%#Eval("Attributes['id']")%>');">                
    <%# Eval("Subject") %>  
</a>  
</AppointmentTemplate> 

function openWin(id)  
{     
    var url = document.location.protocol  + "//" + document.location.host + '/Test.aspx?' + '&id' + id;   
    var openedWin = window.open(url);  
    openedWin.focus();  
}  

and it worked...
Tags
Scheduler
Asked by
Venkata
Top achievements
Rank 1
Answers by
Dimitar Milushev
Telerik team
Venkata
Top achievements
Rank 1
Share this question
or