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

[Solved] summary of appointments

3 Answers 106 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
sabarishbabu
Top achievements
Rank 1
sabarishbabu asked on 15 Sep 2009, 01:53 PM

Hi,

Iam able to create a summary of appointments in the month view by following thesuggestions in this thread

http://www.telerik.com/community/forums/aspnet-ajax/scheduler/customize-event-template-in-month-view.aspx

Iwould like this to happen only in the month view. How to stop it from happeningin the other views?

Thanks

Sabrish

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 16 Sep 2009, 01:42 PM
Hello sabarishbabu,

Handle RadTooltipManager's OnclientBeforeShow like this:

 function clientBeforeShow(sender, eventArgs) {  
                var scheduler = $find('<%=RadScheduler1.ClientID %>');  
                if (scheduler.get_selectedView() != Telerik.Web.UI.SchedulerViewType.MonthView) {  
                    eventArgs.set_cancel(true);  
                }  
 
// * * * 


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
sabarishbabu
Top achievements
Rank 1
answered on 17 Sep 2009, 12:41 AM
Hi Peter,
Okay excellent. Thanks.
There is any other way to handle in server side code?

Thanks
Sabarish
0
Peter
Telerik team
answered on 18 Sep 2009, 11:30 AM
Hi sabarishbabu,

Yes, you can handle AppointmentCreated like this:
 protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)  
    {  
        if (RadScheduler1.SelectedView == SchedulerViewType.MonthView)  
        {  
            if (e.Appointment.Visible && !IsAppointmentRegisteredForTooltip(e.Appointment))  
            {  
                string id;  
                if (e.Appointment.RecurrenceState != RecurrenceState.Occurrence)  
                {  
                    id = e.Appointment.ID.ToString();  
                }  
                else 
                {  
                    id = e.Appointment.RecurrenceParentID.ToString();  
                }  
 
                foreach (string domElementID in e.Appointment.DomElements)  
                {  
                    RadToolTipManager1.TargetControls.Add(domElementID, id, true);  
                }  
            }  
 
        }  
        else 
        {  
            e.Appointment.ToolTip = String.Empty;  
        }  
         
    } 


All the best,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Scheduler
Asked by
sabarishbabu
Top achievements
Rank 1
Answers by
Peter
Telerik team
sabarishbabu
Top achievements
Rank 1
Share this question
or