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
465
UltraGrid EditorWithMask with whole number that optionally ends with "%"
posted

Hi,

I have an UltraGrid with a column using EditorWithMask for entering numbers as string type.  I had the MaskInput set to "nnn,nnn,nnn,nnn,nnn", and it worked just fine showing commas as needed.

var editorSettings = new DefaultEditorOwnerSettings {
  DataType = typeof(string),
  MaskInput = "nnn,nnn,nnn,nnn,nnn" };
var editorWithMask = new EditorWithMask(new DefaultEditorOwner(editorSettings));

Now I have a requirement for user to enter a number with a "%" optionally.  Is there a way to specify such MaskInput?  For example, they can enter numbers with or without "%" sign.

100

10

100%

10%

If it's not possible, how do I implement such feature and do you have any examples?  Thanks.

Parents
  • 6120
    Offline posted

    Hello Michael,

    Thank you for posting on our forums.

    As of now UltraMaskedEditor do not have functionality that supports entering a number with “%” optionally. I recommend using an UltraTextEditor and performing a validation to check for the “%” in the input text for achieving this.

    You can refer to this link to go over the supported input mask characters of UltraMaskedEditor.

    Please let me know if you have any questions.

Reply Children