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

Additional fields in Appointment template

1 Answer 138 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
AndyRutter
Top achievements
Rank 2
AndyRutter asked on 23 Mar 2009, 11:54 AM
Hi I am having trouble adding additional fied data to the appointmenttemplate within the scheduler.
I am getting this error:
DataBinding: 'Telerik.Web.UI.Appointment' does not contain a property with the name 'UserName'.

These are the appropriate parts of code:

<AppointmentTemplate> 
    <asp:Label ID="lblSubject" runat="server" Text='<%# Eval("Subject") %>' /><br /> 
    <asp:Label ID="lblUsername" runat="server" Text='<%# Eval("UserName") %>' /><br />
</AppointmentTemplate>

SelectCommand="SELECT [ID], [Room_FK], [UserName], [Subject], [StartTime], [EndTime] FROM [ncs_AppointmentData]"

The subject label appears but the username label causes the error.
Any ideas?

1 Answer, 1 is accepted

Sort by
0
AndyRutter
Top achievements
Rank 2
answered on 23 Mar 2009, 02:59 PM
I have worked this one out now.
I needed to add the following line to the scheduler declaration:

CustomAttributeNames="UserName"

Seems to me that this should be made a little more obvious within the tutorials and demos.

 

 


 

Tags
Scheduler
Asked by
AndyRutter
Top achievements
Rank 2
Answers by
AndyRutter
Top achievements
Rank 2
Share this question
or