07-26-2018 01:41 PM
Hello team,
I am trying to catch the NumericOutOfRangeMode exception when the user enters a value which is not with in the range.
The user can either click on the arrow buttons on the control or manually enter the value in the text box. I need to handle this exception by providing a custom message to the user gracefully.
But when the user manually enters the value in the textbox of the control and the control loses focus, I am not able to handle the exception because the value in the numeric edit shows the old value and the value entered in the textbox.
I tried using the BeforeChangeValue(), AfterChangeValue(), Leave(), Validating() and LostFocus() events of the control. These events get fired but the control does not reflect the value entered in the textbox, due to which I am not able to check the range condition and build a custom message.
07-26-2018 01:52 PM
Seems the event BeforeChangeValue(object sender, NationalInstruments.UI.BeforeChangeNumericValueEventArgs e) helps me to handle this, found the below thread which had the details on handling this exception.