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

[Solved] Appointment custom attribute not displaying value

4 Answers 163 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 14 May 2009, 10:18 AM
Hi
 I have created a custom attribute using

 

<AppointmentTemplate>

 

 

<asp:Label ID="lblTitle" runat="server"><%# Eval("customTitle") %></asp:Label>

 

 

</AppointmentTemplate>

I call various function that popluate this field wiht various pieces of text. I use the following code 

 

RadScheduler1.DataKeyField =

"ID";

 

RadScheduler1.DataStartField =

"Start";

 

RadScheduler1.DataEndField =

"End";

 

RadScheduler1.DataSubjectField =

"Subject";

 

RadScheduler1.DataRecurrenceField =

"RecurrenceRule";

 

RadScheduler1.DataRecurrenceParentKeyField =

"RecurrenceParentID";

 

 

PupilManagementPupilsService pmpService = new PupilManagementPupilsService();

 

 

using (TList<PupilManagementPupils> pmpList = pmpService.GetAll())

 

{

 

foreach (PupilManagementPupils pmpItem in pmpList)

 

{

 

 

DateTime dteDOBDateTime;

 

 

string txtDate;

 

 

string[] arrayDateTime;

 

 

if (!String.IsNullOrEmpty(pmpItem.TxtDob.ToString()))

 

{

txtDate = pmpItem.TxtDob.ToString();

arrayDateTime = txtDate.Split(

' ');

 

txtDate = arrayDateTime[0].ToString();

dteDOBDateTime =

DateTime.Parse(pmpItem.TxtDob.Value.ToShortDateString());

 

 

 

Appointment appointment = new Appointment("DOB_" + pmpItem.TxtSchoolId.ToString(), dteDOBDateTime, dteDOBDateTime, "none found");

 

appointment.Attributes[

"customTitle"] = "Interview : ";

 

appointments.Add(appointment);

}

}

}

RadScheduler1.DataSource = appointments;

 

RadScheduler1.DataBind();

 

and it doesnt show anything in the customTitle field, even when i hardcode text in.

Do you have any ideas why it would do this? Is there a limit to the number of customfields allowed ?
It works for a few functions correctly but for some reason this one doesnt do anything. I have done a trace and its getting into the function correctly etc..just not populating the custom field

Thanks

Greg

4 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 14 May 2009, 10:26 AM
Hi Greg,

You need to also set:

RadScheduler1.CustomAttributeNames = "customTitle";


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
Andrew
Top achievements
Rank 1
answered on 14 May 2009, 10:55 AM
Hi

I already have this in the control markup:


CustomAttributeNames
="customTitle" 

This is the same as what you asked me to do.

thanks,
0
Peter
Telerik team
answered on 16 May 2009, 12:10 PM
Hello Greg,

Can you isolate the problem in a simple working demo and send it to us for testing via a support ticket?

Greetings,
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
Andrew
Top achievements
Rank 1
answered on 16 May 2009, 12:31 PM
Hi

I think I have sorted the problem now.

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