Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
330
UltraNumeric Editor Mask Input for ? is breaking.
posted

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

  • 469350
    Offline posted

    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+="(\?)"

     

    • 330
      posted in reply to Mike Saltzman

      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.

      Regards

      Vijay A

      • 469350
        Offline posted in reply to Vijay

        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?

        • 330
          posted in reply to Mike Saltzman

          Hi Mike,

            It would be great if you let me know why the control is breaking if i  replace "?" with "\\?" in the text "?\\//?\?\"

           Best Regards

          Vijay A

          • 469350
            Offline posted in reply to Vijay

            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

            • 330
              posted in reply to Vijay

              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.

              Regards

              Vijay A