Hi,
before i save a new appointment in my database, i have to check different issues. This i do in the "AppointmentCreated" Event.
If the Input is wrong i have to go back to the AppointmentDialog. The Problem is, that the Appointment is created an the Dialog
is closed. e.Cancel is not known.
How do i let the Dialog stay open?
Thanks
Rene
before i save a new appointment in my database, i have to check different issues. This i do in the "AppointmentCreated" Event.
If the Input is wrong i have to go back to the AppointmentDialog. The Problem is, that the Appointment is created an the Dialog
is closed. e.Cancel is not known.
How do i let the Dialog stay open?
Thanks
Rene
4 Answers, 1 is accepted
0
Hello Rene,
My suggestion is to use the DialogClosing event instead of the AppointmentCreated in order to check for issues with the Appointment. This way you will be able to keep the EditAppointmentDialog open as needed. Please check the example below, in which the user won't be able to confirm the Dialog if the Subject field is empty:
Hope this helps.
Regards,
Kalin
Telerik
My suggestion is to use the DialogClosing event instead of the AppointmentCreated in order to check for issues with the Appointment. This way you will be able to keep the EditAppointmentDialog open as needed. Please check the example below, in which the user won't be able to confirm the Dialog if the Subject field is empty:
private
void
ScheduleView_DialogClosing(
object
sender, CancelRoutedEventArgs e)
{
var eventArgs = e
as
CloseDialogEventArgs;
var scheduleView = sender
as
RadScheduleView;
if
(eventArgs.DialogResult ==
true
)
{
if
(
string
.IsNullOrEmpty(scheduleView.EditedAppointment.Subject))
{
eventArgs.Cancel =
true
;
MessageBox.Show(
"Subject cannot be empty!"
);
}
}
}
Hope this helps.
Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
ITA
Top achievements
Rank 1
answered on 10 Sep 2013, 06:46 AM
Hi,
thanks so much, but i use CustomAppointments. How do i handle this?
thanks
Rene
thanks so much, but i use CustomAppointments. How do i handle this?
thanks
Rene
0
Hi Rene,
There shouldn't be any difference whether you are using custom Appointments or not. Could you please give us some more details about the desired scenario and the exact problem you are facing?
I'm looking forward to your reply.
Regards,
Kalin
Telerik
There shouldn't be any difference whether you are using custom Appointments or not. Could you please give us some more details about the desired scenario and the exact problem you are facing?
I'm looking forward to your reply.
Regards,
Kalin
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
ITA
Top achievements
Rank 1
answered on 11 Sep 2013, 11:52 AM
Hi,
sorry problem solved: var MyAppointment = scheduleView.EditedAppointment as CustomAppointment;
Thanks
Rene
sorry problem solved: var MyAppointment = scheduleView.EditedAppointment as CustomAppointment;
Thanks
Rene