I have an ultranumericeditor with a min value of 1 and a max value of 31. If the field has a invalid value (0 or blank) When I click on any control OTHER than the ultratoolbar it will not let me leave the field because it does not have a valid value. Clicking on the toolbar still processes (in this case it is a save event).
Is there a way to avoid this or check for an invalid value?
Thanks.
Anybody?
Hello,
Could you please let me know what is the exactly version of Infragistics , which you are using ? Is this behavior is reproducible with the latest service release of 11.1, because I have test this scenario with the latest service release and I was not able to leave UltraNumericEditor and to set the input focus into a TextBoxTool, if I type a value which is not in the Minimum/ Maximum range of the UltraNumericEditor.
I am waiting for your response.
Hi,
Thanks for responding.
Yes this is 11.1. In my original post please note that I mention it only happens when seting focus to the toolbar. It works properly with all other controls.
Hello ,
Thank you for the provided information.
I have used the latest service release of Infragistics 11.1, which is with build number 2042.
I have test your scenario with the UltraToolbarManager and also with the ordinary MS MenuStrip control and if UltraNumericEditor has its MinValue = 1 and MaxValue = 31 when I run the sample, enter a 0 into UltraNumericEditor, I am not able to leave the control and to move the input focus into a Texbox tool of the UltraToolbarManager or MenuStrip, which is expected. ToolClick event of the UltraToolbarManager is firing, which is expected, because in the menu usually has a command like a Copy, Paste and etc., which should be available for the customer event if the editor has an invalid value, in order to allow to paste the correct value into the editor. So if this is your issue you could handle ToolClick event and to check if the input value in UltraNumericEditor is valid.
Please let me know if you have any further questions or I am missing something.
Thank you for providing this work around, this works now.
In order to get current entered value of UltraNumericEditor you should get CurrentEditText the editor ultraNumericEditor1.Editor.CurrentEditText so you could use code like the following, In order to get current value:
int currvalue = int.Parse(ultraNumericEditor1.Editor.CurrentEditText.Replace(ultraNumericEditor1.PromptChar,' '));
when you have this value you could check if it is in the validation range.
Please let me know if you have any further questions.
I am actually already checking the value. Here are the steps to recreate what I am seeing.
1. Keep the example above. After the text box loads change the value in the box from 1 to 0.
2. Hit your toolbar icon.
3. At this point if you check the textbox.value you get 1 not 0.
This is why I cannot use this method to verify that there is a valid amount in the box. Should I be using something else other than the .value property?
Thanks!