We need check some data before leave CustomAppointmentEditDialog form.
How can i stay on CustomAppointmentEditDialog form after check out some data is wrong?
And same question in delete button.
CustomerID: QD1612651
3 Answers, 1 is accepted
0
Accepted
Stefan
Telerik team
answered on 15 Jul 2014, 07:29 AM
Hi Cooper,
Thank you for writing.
You can override the ValidateInput method of the EditAppointmentDialog an validate your data in there. This method is called once the OK button is clicked and if it returns false, the dialog will not be closed. Here is a small sample:
protected override bool ValidateInput()
{
bool result = base.ValidateInput();
if (txtEmail.Text == string.Empty)
{
this.errorProvider.SetError(this.txtEmail, "Emails field cannot be empty");
return false;
}
return result;
}
I hope that you find this information useful.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
How do i stay on CustomAppointmentEditDialog Form after canceled the delete confirm dialog?
0
Stefan
Telerik team
answered on 18 Jul 2014, 09:21 AM
Hi Cooper,
There is a method for the DeleteButton as well. It is called OnDeleteButtonClicked. Here is what is does:
protected virtual void OnDeleteButtonClicked()
{
this.DeleteEvent();
this.DialogResult = DialogResult.Abort;
this.Close();
}
I hope this helps.
Regards,
Stefan
Telerik
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.