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,
I need to know the DotNet Types being used by the grid, not the SQL types.
Ok,
I told you in the previous post, but here it is again.
The phone number is a string ( SQL - nvarchar(11))
the SSN is a numeric (SQL - numeric[9,0))
Larry
Okay, so I still don't know what data type you are working with here. What's the DataType of the grid column?
Mike,
Sorry about that! Yes I switched gears on you. The data was a numeric in SQL Server. In order to display the leading zero using 9999 999 999 (Australian phone numbers), I had to change the column to a string and format worked for the maskededit control.
The issue now is displaying those same numbers in a grid using the format. The last post shows what I am doing with format for both a SSN and those phone numbers. Neither will display properly with any format or maskinput properties I set.
FYI: The SSN is a numeric with 9 digits.
Any suggestions?
Hi,
Your original post was referring to the UltraMaskedEdit control, but now you seem to be referring to a WinGrid column.
Are you still unable to get this to work?
What's the data type of the column?