Telerik RadScheduler and appointment attributes
I've got an aspx page, and in the code behind, I'm building a list of Telerik.Web.UI.Appointment objects, and setting the datasource of the RadScheduler to that list.
For each appointment object I'm adding several attributes to it. Things like CusomerID.
appt.Attributes.Add("CustomerID", 23);
I need to get at this information client side. From the documentation, it appears to me that this should work, but it does not.
var appt = eventArgs.get_appointment();
var list = appt.get_attributes();
var attr = list.getAttribute('CustomerID');
When I run this, att开发者_开发问答r is always undefined.
So, what is my problem? Am I not adding the attributes in the correct way on the server side, or is something messed up with my client side call?
Add CustomAttributeNames="CustomerID" to your tag in the aspx. Otherwise get_attributes() just returns nothing if I recall correctly.
精彩评论