Hi,
I have created a custom appointment edit form. In my main form I added a button to add new appointment to the scheduler.
private void btnAddMessage_Click(object sender, EventArgs e) { if (radScheduler.SelectionBehavior.HasCellsSelected) { radScheduler.Appointments.Add(new AppointmentATC(radScheduler.SelectionBehavior.GetSelectedInterval().Start, radScheduler.SelectionBehavior.GetSelectedInterval().Duration)); radScheduler.ShowAppointmentEditDialog(radScheduler.Appointments[radScheduler.Appointments.Count - 1], false); } else { radScheduler.Appointments.Add(new AppointmentATC(DateTime.Now, TimeSpan.FromHours(0.5))); radScheduler.ShowAppointmentEditDialog(radScheduler.Appointments[radScheduler.Appointments.Count - 1], false); } }
When I click the button everything work fine.
The problem is :
When I click OK button the event AppointmentAdded was not trigger. But when I double click cell in scheduler or when I use the context menu to add appointment with my custom form when I click the OK the event AppointmentAdded is Triggered.
How can I add a button to add an appointment and when I click OK button on the EditAppointment form the event AppointmentAdded is triggered.
Thank you!
