Custom Appointment

2 posts, 1 answers
  1. Ala eddine
    Ala eddine avatar
    19 posts
    Member since:
    Feb 2012

    Posted 21 Jan 2014 Link to this post


    Hello

    I cretated a new class CustomAppointment that inherits Appointment class.


     public class CustomAppointment : Appointment
        {
     
            public string LabelLeft;

            public string LabelRight;
          
           
    ......
    }

    and i want to show the appointments like this  
    ____________________________________________________
    |       labelleft                               |                 labelright                    |
    |_________________________|__________________________|

    so when i tryed to show my CustomAppointment List  "Appointments" by setting the
    AppointmentTemplate by ID :


      <AppointmentTemplate>

                            <div>
                                <h3 class="leftlabel">
                                    <%#Appointments.Where(t=>t.ID == Container.Appointment.ID).FirstOrDefault().LabelLeft%>
                                </h3>
                            </div>
                           
                            <div>
                                <h3 class="rightlabel">
                                      <%#Appointments.Where(t=>t.ID == Container.Appointment.ID).FirstOrDefault().LabelRight%>
                                </h3>
                            </div>

             </AppointmentTemplate>


    i found that    Container.Appointment.ID is empty while t.ID contains the value that i set it in !!

    Any help Please !
  2. Answer
    Boyan Dimitrov
    Admin
    Boyan Dimitrov avatar
    1746 posts

    Posted 24 Jan 2014 Link to this post

    Hello,

    I would like to clarify that I have tested the described scenario and it works as expected. Please find attached a sample page implementing very similar scenario: the appointment template  shows the Container.ID for the current appointment.


    Regards,
    Boyan Dimitrov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top