I have a dropdown and a RadMaskedTextBox on a form. I want the mask applied to the RadMaskedTextBox to be determined by the selected value of the dropdown. Is there any way to do so via javascript? I know I could do a simple postback, but I would prefer not to.
Thanks!
You can try using the undocumented
_SetMaskfunction on your client-sideRadMaskedTextBoxinstance, along with the various mask parts (also available on the client, although under slightly different names):The problem you’re going to run into is that the mask parts are not translated to their respective display prompt in the client right away. For the above mask it would be (
"_-Mon000__"). It seems to wait until blur of the field before rendering the prompt in the browser.Regardless, the text box will respond appropriately to keystrokes according to the rules set out by the mask above.