Keep Mask inside value

2 posts, 0 answers
  1. Christophe
    Christophe avatar
    58 posts
    Member since:
    Feb 2012

    Posted 29 Apr 2015 Link to this post



    Sorry if my question has been asked already in this forum.

    I'm using a RadMaskedTextInput with a dynamic MASK set in code behind. My current mask is d4Sd3. Therefore, I am expecting 4 digits followed with a capital S and then another 3 digits.

    It works well except that in my code behind I would like to get the full content of the input. If I type in 1234567 it displays 1234S567 which is perfect, but then in my code behind I only get 1234567 and the "S" is gone. I need this S to remain in this string. How can I achieve such thing ? This is just an example, it could be any sort of mask.





  2. Petar Mladenov
    Petar Mladenov avatar
    2986 posts

    Posted 29 Apr 2015 Link to this post

    Hello Chris,

    The Value in combination with the Placeholder and Mask symbols (such as "S" in the Mask "d4Sd3") is kept in the Text property of the RadMaskedTextInput. However, please keep in mind that this property is designed to work only to retrieve the Text, setting it will do nothing and will not update the Value property.

    Text property can return different results depending on the value of the TextMode property.

    Petar Mladenov

    See What's Next in App Development. Register for TelerikNEXT.

Back to Top