Hi. I am looking to try to create a copy of an Appointment object and was wondering if there is an easy, built-in way to do it. I've looked through the appointments documentation, but didn't see any reference to a clone method or anything like that, so I am guessing there isn't, but I thought that I should double check before I proceed since a solution would save me a lot of time.
Hello,
I suppose serialization would be the best bet to clone the appointment. There is a solution on the following forum thread that you might find useful:
https://ko.infragistics.com/community/forums/f/ultimate-ui-for-windows-forms/91004/winschedule-serialize-issue-with-using-the-appointment-tag/450301
Please let me know if this helps.
Sincerely,
Tihomir TonevSoftware DeveloperInfragistics
Well I am trying to create a custom appointment dialog box. To do so, I handle the BeforeDisplayAppointmentDialog event to open mine instead of the default. The event args for this include an appointment object already, which can either be a new appointment object, or an existing one. I pass this appointment object directly to my custom dialog box, so that it is able to handle both the creation of new appointments, as well as the modification of existing ones. The problem is that if the user starts editing an existing appointment, the changes are immediately reflected in the ultracalendarinfo object since this is the same appointment object that is in it's appointments collection. I would like to make a clone of the appointment object, so that I can store the results of the user's changes in it until they select save, at which point I will remove the old appointment, and add the new. This way, if they change their mind halfway through, I can just discard the clone, and leave things exactly as they were.
Thank you for posting on our forums.
How do you create the appointment? Have you checked the relevant events around appointment creation in order to clone the data. The appointment api will not have methods for clonning, but the hosting controls have tools to manipulate appointments to a degree. For instance:
www.infragistics.com/.../infragistics.win.ultrawinschedule~infragistics.win.ultrawinschedule.ultracalendarinfo~afterappointmentadded_ev