In order to store SSN, I'm using an UltraMaskedEdit control with the following settings:
DataMode = IncludeBothDisplayMode = IncludeBothEditAs = UseSpecifiedMaskInputMask = 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.
I have some more information on this. When I debug during form load, I see that ultramaskedit.Value has the correct format 'XXXXX2313'. It is only the ultramaskedit.text property that is incorrect and that's why it displays 'XXX-X2-313X' instead of 'XXX-XX-2313'
Hi,
I think in order to get this to work, you will need to save the literals (the dashes) into the data database. You can do this by setting the MaskDataMode property to IncludeLiterals (or maybe IncludeBoth).