Binding to scheduler/advanced form

4 posts, 0 answers
  1. towpse
    towpse avatar
    224 posts
    Member since:
    Mar 2008

    Posted 01 Dec 2009 Link to this post

    I'm still conflicted about how to load the advanced form and prepopulate custom controls on an existing appointment.

    Currently my GetAppointments method will return a collection of Telerik Appointments which the scheduler can easily understand and render.
    When I go to edit an existing appointment, I need to bind data to custom controls that the appointment class does not have.
    I'm still not certain how this is acheived.

    I've toyed with creating my own appointment class that derives from the telerik one but the web service provider method I am using will only allow implementing methods that use the telerik appointment.

    The thing that I am missing is what happens when a user clicks on the existing appointment.
     Where does my custom data will come from?
    I have the ID of my appointment in the telrik appointment object. Am I to make a DB call to get the extra info?

    Here's an example of my provider.Get method. This method returns the appointments to the scheduler.

                    List<Appointment> appointmentsList = new List<Appointment>();  
                    List<MySpecificAppointment> appts = new List<MySpecificAppointment>();  
                    using (AppointmentFacade af = new AppointmentFacade())  
                        appts = ocsf.GetSecureAppointments(HttpContext.Current.User.Identity.Name); //gets appts for user  
                    foreach (var apt in appts)  
                        Telerik.Web.UI.Appointment appointment = new Appointment();  
                        appointment.Start = apt.Start;  
                        appointment.End = apt.End;  
                        appointment.Description = apt.Description;  
                        appointment.Subject = apt.Subject;  
                        appointment.RecurrenceState = apt.RecurrenceState;  
                        appointment.RecurrenceRule = apt.RecurrenceDescription;  
                        appointment.RecurrenceParentID = apt.RecurrenceParentID;  
                        appointment.ID = apt.Id;  

    I can fill the telrik appointment with common objects but anything specififc to MySpecififcAppointment is lost. When a user goes to edit the existing appointment, when the advanced form is loaded only Telerik.Appointment properties will be properly prepopulated.

    Any help would be fantastic. Cheers.

  2. Peter
    Peter avatar
    6637 posts

    Posted 04 Dec 2009 Link to this post

    Hi towps,

    We have a nice step-by-step tutorial showing how to achieve this:

    Please, refer to the second part: How to use the advanced user controls in Client Side binding mode (Web Services)

    In this tutorial, we will show how to add to the advanced form

    • a Description RadTextBox bound to a custom attribute
    • a RadColorPicker which will allow you to save the selected color in a custom attribute and apply it to the appointment in the OnClientAppointmentDataBound event.

    We will be glad to assist you further if needed.

    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Martin de Tonnancourt
    Martin de Tonnancourt avatar
    1 posts
    Member since:
    Feb 2010

    Posted 28 Sep 2011 Link to this post

    Hi Peter,

    Your link dosen't work. Is the tutorial available somewhere else ?
  4. Peter
    Peter avatar
    6637 posts

    Posted 03 Oct 2011 Link to this post

    Hello Martin,

    Please, use the following link -

    Kind regards,
    the Telerik team
    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 their blog feed now
Back to Top