Query how I fetch the details like Date,Time,Subject,Location etc from scheduler control? |
Solution-1 If you want to get the details of the selected appointment or remainder of the particular event, you can use the SelectedAppointments property. Please make use of below code,
Code Snippet: foreach (IScheduleAppointment appointment in this.scheduleControl1.GetScheduleHost().SelectedAppointments) { MessageBox.Show("Appointment Date is " + appointment.StartTime.ToLongDateString() + "\n" + "Start Time is " + appointment.StartTime.ToLongTimeString() + "\n" + "End Time is " + appointment.EndTime.ToLongTimeString() + "\n" + "Subject is " + appointment.Subject.ToString() + "\n" + "Location is " + appointment.LocationValue.ToString()); } |
Solution-2 If you want to get the details of all the appointments, you can use the dataprovider which is used to generate the data of the schedule control. Please make use of below code, Code Snippet: if (dataProvider != null) { for (int i = 0; i < dataProvider.MasterList.Count; i++) { IScheduleAppointment appointment = dataProvider.MasterList[i]; MessageBox.Show("Appointment Date is " + appointment.StartTime.ToLongDateString() + "\n" + "Start Time is " + appointment.StartTime.ToLongTimeString() + "\n" + "End Time is " + appointment.EndTime.ToLongTimeString() + "\n" + "Subject is " + appointment.Subject.ToString() + "\n" + "Location is " + appointment.LocationValue.ToString());
} } |