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

OnAppointmentClick - accessing appointment attirubtes

1 Answer 97 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Marty
Top achievements
Rank 1
Marty asked on 11 Nov 2008, 04:14 PM
I'm trying to do access the DataKeyField's value for whatever appointment was cilcked from the 

 

OnAppointmentClick event so that I can redirect to a different page with the DataKeyField's value sent along with it, which will be used to pull and display detailed data from the database.  I've searched the forums and can't seem to find out how this is done.  The scheduler is a read-only scheduler so using events that fire on modified appointments will not work.

The code is here:

<telerik:RadScheduler ID="ChangeCalendar" runat="server" DataKeyField="ChangeControlID"   
                    DataSubjectField="ChangeControlNumber" DataStartField="TargetStartDate" 
                    DataEndField="TargetEndDate" AllowDelete="False" OverflowBehavior="Expand"
                     OnAppointmentClick="ChangeCalendar_OnAppointmentClick"  
                        ReadOnly="True" SelectedView="MonthView">  
              
            </telerik:RadScheduler> 


I know this has to be easy... but I cannot seem to find anything about how to do this.

Thanks.

1 Answer, 1 is accepted

Sort by
0
Marty
Top achievements
Rank 1
answered on 11 Nov 2008, 04:58 PM
protected void ChangeCalendar_OnAppointmentClick(object sender, Telerik.Web.UI.SchedulerEventArgs e)  
    {  
       Response.Redirect("Changeform.aspx?ChangeControlID="+e.Appointment.ID);  
    } 

That's it.  I figured it out through some other unrelated posts.  I'm posting here in hopes that it's easier to find for somebody else.  It was simply a matter of using the Telerik.Web.UI.SchedulerEventArgs as the event passed along to the event method, then referencing the value through the event.

Thanks,

Marty
Tags
Scheduler
Asked by
Marty
Top achievements
Rank 1
Answers by
Marty
Top achievements
Rank 1
Share this question
or