HI All,
When i try to maskinput for the ultraNumeric editor with the value "?" it is breaking.i am trying to set the value as follows
editor.NumericType = NumericType.Double;
editor.MaskInput ={double:-9.2}
editor.Nullable = true;
editor.MaskInput+="(?)"
i am getting error from the above line only when i try to set "?". it is working for "%" and other things.
Error details are as follows
Inner exception :"The specified mask is not compatible with the current value of the 'NumericType' property."
Stack Trace : at Infragistics.Win.UltraWinEditors.UltraNumericEditor.set_MaskInput(String value)
source :"Infragistics2.Win.UltraWinEditors.v6.3"
Regards
Vijay A
The question mark is a mask character and you can't mix another mask character onto the end of an existing pre-defined mask.
If you are trying to display a literal question mark after the value in the NumericEditor, then you I think you have to escape it like so:
editor.MaskInput+="(\?)"
Hi Mike,
Thanks for the reply
Solution worked when i used as following
editor.MaskInput+="(\\?)"
but if I have text "?\\//?\?\" and replace "?" with "\\?" it is breaking as said above.
Please suggest the solution for this.
HI Mike,
i also need one more details.What are the esacape character which are needs to be handled like above. Please provide the list and solution to the above question also.
Hi Vijay,
I'm not sure what you mean by "breaking" exactly. What are you trying to acheive? The mask you have here appears to be a bit jumbled - or at least hard for a human to read. :)
It looks maybe you are trying to make a mask out of all literal characters with no replacement codes anywhere in it. But that doesn't make sense.
Which of the "?" characters in this mask are supposed to be literal and which ones are mask characters?
I assume you are programming in C# and not VB, since you are using "//" to represent a single "/" in the mask. This, of course, makes the issue even more confusing since there are two levels of escapement going on. Perhaps it would be easier if you used a "@" before the string, so there's only one level?
It would be great if you let me know why the control is breaking if i replace "?" with "\\?" in the text "?\\//?\?\"
Best Regards
Any character that is used for masking would have to be escaped in order to be treated as a literal. So you can check the help for the InputMask property and there is a complete list of all of the mask characters.
MaskInput Property