How can I get a "CustomAppointment"?
Hello.
Attachment: SfSchedule_CalendarEdit_3159e7ad.rar
I attached the project file. If you run the project, you receive an error typecast. How can I get "CustomAppointment" using "SchedulerAppointment"?
Attachment: SfSchedule_CalendarEdit_3159e7ad.rar
SIGN IN To post a reply.
3 Replies
VR
Vigneshkumar Ramasamy
Syncfusion Team
August 16, 2016 07:00 AM UTC
Hi Berezkin,
Based on your requirement we have modified the previous attached sample to get custom appointment from the schedule appointment and please find the sample in the below link.
Sample Link:
SfSchedule_CalendarEdit
SfSchedule_CalendarEdit
In the above sample we have used the below code snippet to get the custom appointment.
|
var CustomAPP = GetCustomAppointment(schedule.Appointments[0]);
>>>>>>>>>>>>>>>>>>>>
CustomAppointment GetCustomAppointment(ScheduleAppointment app)
{
CustomAppointment CustomApp = new CustomAppointment();
CustomApp.Name = app.Subject;
CustomApp.Locaion = app.Location;
CustomApp.AppointmentStartTime = app.StartTime;
CustomApp.AppointmentEndTime = app.EndTime;
return CustomApp;
} |
If the above provided solution doesn’t satisfy you requirement could you, please provide more information about your requirement? So that we could analyze on your requirement further and provide you the possible solution.
Regards
Vigneshkumar R
BG
Berezkin Gena
August 16, 2016 10:01 AM UTC
How can I get the Name (or Appointment_ID) property? He is not in the Schedule Appointment.
CustomAppointment GetCustomAppointment(ScheduleAppointment app)
{
CustomAppointment CustomApp = new CustomAppointment();
CustomApp.Name = app.Subject;
CustomApp.Locaion = app.Location;
CustomApp.AppointmentStartTime = app.StartTime;
CustomApp.AppointmentEndTime = app.EndTime;
CustomApp.Name = ???app.Name???;
return CustomApp;
}
VR
Vigneshkumar Ramasamy
Syncfusion Team
August 17, 2016 10:35 AM UTC
Hi Berezkin,
As of now your requirement of getting Appointment_ID can be achieved by using CustomAppointment collection (Source). We have prepared a sample for the same and please find the sample in the below link.
Sample Link: SfSchedule_CalendarEdit
In the above sample we have used below code snippet to get the Appointment_ID.
|
foreach(CustomAppointment CustomApponitment in Source)
{
if(app.ObjectID== CustomApponitment.GetHashCode())
{
CustomApp.Appointment_ID = CustomApponitment.Appointment_ID;
}
} |
Regards
Vigneshkumar R
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
-
BG Berezkin Gena
- Aug 12, 2016 01:46 PM UTC
- Aug 17, 2016 10:35 AM UTC