private void radButtonNewAppointmentScheduler_Click(object sender, EventArgs e) { // if creating new appointment AppointmentForm addAppointmentForm = new AppointmentForm(); addAppointmentForm.StartPosition = FormStartPosition.CenterParent; addAppointmentForm.ShowDialog(this); this.SetSchedulerAppointmentsBackground(); }
private void radScheduler1_AppointmentEditDialogShowing(object sender, AppointmentEditDialogShowingEventArgs e) { e.Cancel = true; // if creating new appointment AppointmentForm addAppointmentForm = new AppointmentForm(); if (e.Appointment.DataItem != null) { DataRowView rowView = e.Appointment.DataItem as DataRowView; addAppointmentForm.Tag = rowView.Row; } else { addAppointmentForm.Tag = new Appointment(e.Appointment.Start, e.Appointment.End); } addAppointmentForm.StartPosition = FormStartPosition.CenterParent; addAppointmentForm.ShowDialog(this); this.SetSchedulerAppointmentsBackground(); }