MaskedTextBox using Enumeration parts delete not working as expected

2 posts, 0 answers
  1. Chris
    Chris avatar
    4 posts
    Member since:
    Nov 2008

    Posted 19 May Link to this post

    Hi,

    I am using the Maskedtextbox for user input of a mac address, I am using the following code which works fine.  It displays "00-00-00-00-00-00" on initial load and only accepts characters 0-9 and A-F

    <telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>

     

    The issue arises when I press the backspace to delete, all that happens is the cursor moves back but does not reset the character back to the initial mask value which is what I would expect to happen.

    How can I achieve this.

     

    Chris

    1.<telerik:RadMaskedTextBox RenderMode="Lightweight" ID="RadMaskedTextBox3" runat="server" Mask="<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>-<0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F><0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F>"></telerik:RadMaskedTextBox>
  2. Maria Ilieva
    Admin
    Maria Ilieva avatar
    4017 posts

    Posted 24 May Link to this post

    Hello Chris,

    Try out to set these properties to make it work as you are expecting:

    AllowEmptyEnumerations="true"
    PromptChar="0"


    Regards,
    Maria Ilieva
    Telerik
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top