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
230
Issue with UltraMaskEdit control
posted

In order to store SSN, I'm using an UltraMaskedEdit control with the following settings:

DataMode = IncludeBoth
DisplayMode = IncludeBoth
EditAs = UseSpecifiedMask
InputMask = 999-99-####
PromptChar = X

The reason I have input mask in the specified way is that the users must also be able to enter only the last four digits of SSN as well in case they don't want to enter the entire SSN.
The problem I'm facing is, when I enter only the last four digits, even though the data that I saved in the database is like 'XXXXX2313', when I load my form in update mode, it is displayed as 'XXX-X2-313X'.
However when all the 9 digits of SSN are entered, the display is fine when reloading the form as well.
How do I resolve this issue that happens when entering only the last four digits? Kindly clarify.