Hi,
I want to ask yes/no question to my users before UltraCalendarCombo change de value.
He don't have event "BeforeValueChange".
When I using Validating event is not work if the user tape the new date and press enter (only when he leave the box)
I use event keyDown and add code IF e.KeyCode = KeyEnter Then date.PerformAction(ExitEditMode) but Validating Event is not popup.
Question :
How I can validating with msgbox yes/no question before de value change. Two method the user can change de value 1 - When is taping de date and press enter or 2 - When is DropDown and select the date.
Thank you.
Francois.
ok Thank you.
Hello Francois,
The validating method of our controls follows Microsoft’s validating event. It fires when the control loses focus. For more information about this event please follow this link:
http://msdn.microsoft.com/en-us/library/system.windows.forms.control.validating(v=vs.110).aspx
What you could do in your case is to define a custom property for your form which keeps the previous value of the calendar combo. Then when the user changes the value of the combo to validate the control by using the yes or no MessageBox. If the user clicked yes to change the value, if it clicked no to keep the previous value.
I have attached a sample which demonstrates my approach.
Please let me know if you have any additional questions.