I am trying to format an Australian phone number with the UltraMaskedEdit control in the following way
nnnn nnn nnn
9999 999 999
#### ### ###
I can input using any of these input masks, but the phone numbers in Australia have leading zeroes i.e. 0419 999 999. Since the user must dial the zero, I need the leading zero to be displayed.
How can I input this number and not have the data in the control shift left because of the leading zero? The data is defined as a numeric with 11 digits total.
Keep in mind that the application must also store U.S. phone numbers also.
Thanks
Larry Burns
Hi Larry,
My guess is that you probably need to adjust the MaskDisplayMode and tell it to include literals and padding.
With e.Layout.Bands(0)
.Columns("ssn").Format = "###-##-####"
.Columns("ssn").CellAppearance.TextHAlign = HAlign.Right
.Columns("phone1").MaskInput = "9999 999 999"
.Columns("phone1").Format = "9999 999 999"
With .Columns("Phone1")
.MaskDataMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiteralsWithPadding
.MaskClipMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiteralsWithPadding
.MaskDisplayMode = Infragistics.Win.UltraWinMaskedEdit.MaskMode.IncludeLiteralsWithPadding
End With