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

Binding to scheduler/advanced form

3 Answers 103 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
towpse
Top achievements
Rank 2
towpse asked on 01 Dec 2009, 06:22 PM

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;  
                    appointmentsList.Add(appointment);  
                } 

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.

3 Answers, 1 is accepted

Sort by
0
Peter
Telerik team
answered on 04 Dec 2009, 09:38 AM
Hi towps,

We have a nice step-by-step tutorial showing how to achieve this:
http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html

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.

Regards,
Peter
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.
0
Martin de Tonnancourt
Top achievements
Rank 1
answered on 28 Sep 2011, 11:28 AM
Hi Peter,

Your link http://www.telerik.com/help/aspnet-ajax/schedule_advancedformtemplate.html dosen't work. Is the tutorial available somewhere else ?
0
Peter
Telerik team
answered on 03 Oct 2011, 10:17 AM
Hello Martin,

Please, use the following link -
http://www.telerik.com/help/aspnet-ajax/scheduler-customzing-advanced-form-advanced-templates.html

Kind regards,
Peter
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
Tags
Scheduler
Asked by
towpse
Top achievements
Rank 2
Answers by
Peter
Telerik team
Martin de Tonnancourt
Top achievements
Rank 1
Share this question
or