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

Customize Edit Appointment

7 Answers 119 Views
ScheduleView
This is a migrated thread and some comments may be shown as answers.
Tejas
Top achievements
Rank 1
Tejas asked on 23 Jan 2012, 08:23 AM

I have some additional Fields for Appointment. I added them in the SqlAppointment Table. and Implemented IAppointment interface.

I also customized EditAppointmentDialogStyle. In this style I added Custom DataTemplate with Some required Comboboxes. When I Add or Edit Appointment - In DataTemplate Binding - Occurence.Appointment does not have my extended properties. So how to set my extended properties while Newly Creating Appointment or while editing Existing Selected Appointment. Is there any way I can solve this problem?

Thanks for your time and help..

7 Answers, 1 is accepted

Sort by
0
Rosi
Telerik team
answered on 23 Jan 2012, 05:27 PM
Hi,

I suggest you override the Copy and CopyFrom methods of appointment as it is shown here:
http://www.telerik.com/help/silverlight/radscheduleview-features-appointments-custom-appointment.html

Regards,
Rosi
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tejas
Top achievements
Rank 1
answered on 24 Jan 2012, 05:19 AM
Is there any way I can achieve it while Implementing IAppointment Interface or  is it must to inherit from Appointment Class? Cause in case of interface implementation I don't have Copy and CopyFrom methods to override. what actually this methods does?
0
Yana
Telerik team
answered on 26 Jan 2012, 03:56 PM
Hello Tejas,

We recommend inheriting Appointment or AppointmentBase classes instead of implementing the interface.
You need to set the additional properties of the appointment in CopyFrom method as shown in the article.

All the best,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Tejas
Top achievements
Rank 1
answered on 06 Feb 2012, 02:37 AM
Hi Yana,
Do you have any Full working Example/Sample which inherits Appointment or AppointmentBase just  like you provided for implementing IAppointment.
Cause Example shown in Documentation helps but integrating everything together is bit tedious.  So if you can provide any full sample example for customizing whole Control with any of  the option with little bit of explanation,  it will be lot easier for any newbie to understand and mold it according to their own requirements.

Thank you very much..
0
Yana
Telerik team
answered on 09 Feb 2012, 04:13 PM
Hello Tejas,

If you're loading the appointments using services, your custom appointment class should implement IAppointment interface (inheriting Appointment/AppointmentBase as I suggested in my previous post will not work). Could you please send us the definition of your custom Appointment ( which implements IAppointment) and we will try to add Copy and CopyFrom methods? Thanks

Kind regards,
Yana
the Telerik team
Sharpen your .NET Ninja skills! Attend Q1 webinar week and get a chance to win a license! Book your seat now >>
0
Pete
Top achievements
Rank 1
answered on 10 Jan 2013, 09:43 AM
Does this mean that the scheduleview will now work with IAppointment objects (instead of Appointment objects)?

We tried to use custom classes that implemented IAppointment but they did not work (exceptions, drag and drop not working etc) so we have had to wrap all of our different schedule objects in one big wrapper class that extends Appointment. This is a really horrible solution and means that we have many switch statements and complicated copy in the Copy and CopyFrom methods.

If we are now able to code against the interface we could greatly improve our code.

Thanks

0
Yana
Telerik team
answered on 15 Jan 2013, 12:18 PM
Hello Pete,

I guess that you need to bind the ScheduleView to ObservableCollection<IAppointment> and add different objects of types that implement IAppointment, is this correct? I am afraid this is possible only in ReadOnly mode - you cannot create appointments with ScheduleVIew like this ( I mean with double-click on a timeslot).

If you're using the ScheduleView for viewing, editing and deleting appointments, you can try this approach, otherwise you will have to stick to your current implementation.

Greetings,
Yana
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
ScheduleView
Asked by
Tejas
Top achievements
Rank 1
Answers by
Rosi
Telerik team
Tejas
Top achievements
Rank 1
Yana
Telerik team
Pete
Top achievements
Rank 1
Share this question
or