Adding custom properties to Scheduler display

3 posts, 1 answers
  1. James
    James avatar
    29 posts
    Member since:
    Sep 2008

    Posted 17 Jul 2009 Link to this post

    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. Answer
    Peter
    Admin
    Peter avatar
    6637 posts

    Posted 20 Jul 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. James
    James avatar
    29 posts
    Member since:
    Sep 2008

    Posted 20 Jul 2009 Link to this post

    Hi Peter,
    Thanks - that's just what I needed to know.

    James
Back to Top