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.
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.
ok Thank you.
Please let me know if you need my further assistance on this issue.
I'm having similar issues with this control. I have it set so it doesn't AutoCloseUp so I can select multiple dates per the video, but I can't seem to make the Combo exit | leave without having to hit the button twice.
Any tips would be greatly appreciated!
I'm not using C# or Vb so kind of difficult to attach a full project, but I've attached the basic code the video shows. Should be able to reproduce with that.
CONSTRUCTOR PUBLIC CalendarCombo ( ): SUPER(). InitializeComponent(). THIS-OBJECT:ComponentsCollection:ADD(THIS-OBJECT:components). ultraCalendarCombo1:CalendarInfo:SelectTypeDay = SelectType:Extended. ultraCalendarCombo1:AutoCloseUp = False. ultraCalendarCombo1:AutoSelect = False. ultraCalendarCombo1:AutoSelectionUpdate = True. ultraCalendarCombo1:SpinButtonsVisible = True. CATCH e AS Progress.Lang.Error: UNDO, THROW e. END CATCH. END CONSTRUCTOR. /*------------------------------------------------------------------------------ Purpose: Notes: ------------------------------------------------------------------------------*/ @VisualDesigner. METHOD PRIVATE VOID ultraButton1_Click( INPUT sender AS System.Object, INPUT e AS System.EventArgs ): ultraCalendarCombo1:PerformAction(Infragistics.Win.UltraWinSchedule.CalendarCombo.CalendarComboAction:CloseUp). ultraCalendarCombo1:PerformAction(Infragistics.Win.UltraWinSchedule.CalendarCombo.CalendarComboAction:UpdateValue). MESSAGE "button hit" VIEW-AS ALERT-BOX. RETURN. END METHOD.
Hi Brad,
I tried reproducing this in a C# project, but was not successful. Please try the attached project in your environment and let me know whether the issue occurs.
My reproduction steps were as follows:
1) Run the sample2) Press the dropdown button to show the calendar3) Select a range of dates4) Press the button
In my test, the dropdown closes at this point. If I am understanding the issue correctly, the dropdown would not have closed in your scenario.
Please try this out and let me know what you observe, and whether you can modify the sample in order to reproduce the issue.
CalendarInfoMultiSelect.zip
Hello Mike,
Thank you for taking the time to have a look at this.
The issue I'm having is that when I select multiple dates in the dropdown, I have to hit the button twice to get the button code to fire. If I use the spin buttons and/or type in a date, hitting the button once leaves the calendarcombo control as expected.
Basically, the application needs are select 1 or more dates, and hit the button to do something that processes all the selected dates.
TIA,
Brad
This is expected behavior, as the first click will close the dropdown and not be handled by the form. One way you might get the desired behavior is to check the mouse state and position when the dropdown closes. If the left button is down and the mouse is over the button, run the button's click logic.
Please let me know if you find this helpful.