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

[Solved] Appointment template

1 Answer 233 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Julia Shah
Top achievements
Rank 1
Julia Shah asked on 21 Jan 2008, 06:57 PM
Hi,

Is there any way to define different appointment templates for day, week, and month views? I would like to show only a subject on month view, but since we have more space on day view, I'd like to show additional attributes.

Thanks,
Julia

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 22 Jan 2008, 10:17 AM
Hi Julia,

Thank you for this question.

Please, consider the following example. Suppose you have a label and a panel with varios other controls in the appointment template and that you want to display only the label in MonthView. You can use the AppointmentCreated event to find the panel and set its Visible property to false:

aspx:
 <AppointmentTemplate>              
             <asp:Label ID="Label1" runat="server" Text='<%# Bind("Subject") %>'  ></asp:Label> 
             <asp:Panel ID="Panel1" runat="server" > 
                 <asp:CheckBox ID="CheckBox1" runat="server" /> 
                 <asp:CheckBox ID="CheckBox2" runat="server" /> 
             </asp:Panel>               
         </AppointmentTemplate>   


code-behind:
protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)  
    {  
        if (RadScheduler1.SelectedView == SchedulerViewType.MonthView)  
        {  
            Panel panel1 = (Panel)e.Container.FindControl("Panel1");  
            panel1.Visible = false;  
        }  
    } 


Should you have any other questions, please do not hesitate to contact us.


Greetings,
Peter
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Scheduler
Asked by
Julia Shah
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or