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

How to bind field in template to an custom attribute?

1 Answer 66 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Ron Michael Zettlemoyer
Top achievements
Rank 1
Ron Michael Zettlemoyer asked on 04 Aug 2010, 07:42 PM
This should be simple but I can't figure it out.  How do I bind a field in a template to a custom attribute?  I thought something like
value='<%# DataBinder.Eval(Container, "Attributes[\"MyTime\"]") %>' would work but it doesn't.

1 Answer, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 09 Aug 2010, 01:25 PM
Hello Ron,

Suppose you set CustomAttributeNames="MyTime" for RadScheduler. Then, you can use the following code to show the value of  your custom attribute in an appointment template:

<AppointmentTemplate>
         <%# Eval("MyTime")%>
      </AppointmentTemplate>

I hope this helps.


Greetings,
Peter
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Scheduler
Asked by
Ron Michael Zettlemoyer
Top achievements
Rank 1
Answers by
Peter
Telerik team
Share this question
or