Hello.
I have a masked editor and I'm trying to get it to accept input in various formats depending on the first character in the mask. eg:
if the type is 1
100/23-24-080-12W9
if the type is 2
201/D-223-R290-R23
Is this possible with the XamMaskedEditor?
James
Hello,
You can achieve this with hooking to the TextChange event, and change masks at run time depending on first typed character.
Other way is to hook to KeyDown or KeyUp event and again change masks depending on pressed key - 1 or 2.
If you need further help, I can provide you a sample project.
Regards,
Anastas
I tried this and it works. Thank you for the response. I was wondering if there was any way to further narrow the options for the user to enter in certain positions. For example in the 1 mask:
100/23-24-080-12W9/
Is there a way to ensure that the underlined character is either an 'E' or 'W'.
Is there a way to ensure that the bolded number is always less than a value of 128?
Thanks,
No, I don't need any further assistance on this. Thank you for your help.
I am just checking if you require any further assistance on the matter.
You should write you custom logic to verify this. There are ValueConstraints that you can set, but I think they won't be helpful in your case. Maybe using a RegEx will be helpful.