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

[Solved] add new members to Appointment class

1 Answer 107 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Sunil
Top achievements
Rank 1
Sunil asked on 03 Jun 2008, 07:58 PM
1.If I have a situation wherein I need to add columns to Appointments tables and use it to add further functionality. For ex: I need to add a column called
"urgency" and the user should update the Urgency field via update template. How do I make changes to the Appointment class and do I have access to the class to add my own members and methods?
2.I also need to add some non udpateable from UI fields but need those to be a part of the Appointment class so as to do something like e.Appointment.MyField etc. Please suggest.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 05 Jun 2008, 11:37 AM
Hi Sunil,

1. You can use Custom Attributes to do this.

2. For some custom attributes which you want to be read only, you can find the respective textbox control in the FormCreated event and set its ReadOnly property to true. For example:

 <telerik:RadScheduler ID="RadScheduler1" runat="server"   
    CustomAttributeNames="Annotations"   
    EnableCustomAttributeEditing="true" 

protected void RadScheduler1_FormCreated(object sender, Telerik.Web.UI.SchedulerFormCreatedEventArgs e)  
    {  
        if (e.Container.Mode == SchedulerFormMode.AdvancedInsert ||    
        e.Container.Mode == SchedulerFormMode.AdvancedEdit)    
        {  
            TextBox annotations = (TextBox)e.Container.FindControl("AttrAnnotations");  
            annotations.ReadOnly = true;             
        }  
    } 




Peter
the Telerik team

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