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

Adding custom properties to Scheduler display

2 Answers 74 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 17 Jul 2009, 05:07 PM
Hi all,
I've got my own Appointment class which has extra info - apart from Subject etc. - for example customer account number (CustAcctNumber).

I want to display this, formatted separately, on the Scheduler screen using Templates.

How can I access the CustAcctNumber in the template?

I've seen mention of CustomAttributes, but am not sure if this is the right way to go.

Any pointers would be appreciated!

Thanks,

James

2 Answers, 1 is accepted

Sort by
0
Accepted
Peter
Telerik team
answered on 20 Jul 2009, 11:31 AM
Hi James,

Yes, custom attributes is the right way to go. Suppose you set CustomAttributeNames="CustAcctNumber". Then you can access the value in the appointment template like this:
 <AppointmentTemplate> 
                 
                    <h2> 
                        <%# Eval("Subject") %> 
                    </h2> 
                   <%# Eval("CustAcctNumber") %> 
                  
            </AppointmentTemplate> 
 

Similar approach using Subject instead of a custom attribute is shown in the Templates demo:
http://demos.telerik.com/aspnet-ajax/scheduler/examples/templates/defaultcs.aspx

Let us know if you need further help.


Regards,
Peter
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
James
Top achievements
Rank 1
answered on 20 Jul 2009, 11:39 AM
Hi Peter,
Thanks - that's just what I needed to know.

James
Tags
Scheduler
Asked by
James
Top achievements
Rank 1
Answers by
Peter
Telerik team
James
Top achievements
Rank 1
Share this question
or