RadMaskedTextBox allow Users to insert data when editing

4 posts, 0 answers
  1. Simon
    Simon avatar
    2 posts
    Member since:
    Nov 2011

    Posted 21 Nov 2011 Link to this post

    Hi,

    I'm having trouble with the edit functionality of the RadmaskedTextBox.  We have a masked textbox for phone numbers with the following mask: "(##) #### ####" where the area code is in the brackets, followed by the actual number.

    The problem is that when this textbox is populated with data from the database, sometimes the phone number does not have the area code, so it appears like this: (12) 1234 12__.  When the textbox is selected and the caret placed at the start of the text, instead of inserting the missing area code at the start, it over-writes the existing data.

    I have tried setting the textbox mask to be "##########" and the displayMask to be "(##) #### ####", but it still pads out the missing characters and over-writes the data when edited.

    Is there a way of doing this?  Or should we just go back to using standard textboxes?
  2. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 24 Nov 2011 Link to this post

    Hi Simon,

    Thank you writing.

    RadMaskedEditBox does not support this functionality. You cannot shift the numbers in the Standard Mask.
    Do not hesitate to contact us if you have other questions.

    Regards,
    Peter
    the Telerik team

    Q2’11 SP1 of RadControls for WinForms is available for download (see what's new); also available is the Q3'11 Roadmap for Telerik Windows Forms controls.

  3. UI for WinForms is Visual Studio 2017 Ready
  4. Simon
    Simon avatar
    2 posts
    Member since:
    Nov 2011

    Posted 24 Nov 2011 Link to this post

    Thanks for your reply Peter.
    Can you advise on whether there is any plans to support this functionality?  Because quite frankly its a very clunky UI if users are forced to over-write all of the data in the textbox if they just want to add a character to the start.
    A suggested functionality would be to allow the mask to be disabled onfocus so that the data can be edited easily, then reapplied when they move away from the field.
    After all, we are all in this to make it easier for users...
  5. Peter
    Admin
    Peter avatar
    1148 posts

    Posted 30 Nov 2011 Link to this post

    Hi Simon,

    I am afraid that mask cannot support character insert, because it defines what stands behind every position - letter ot digit. For example Mask can be "0L0(L)L0" that means digit, letter, digit, letter, letter, digit and we cannot shift correctly the characters to their new positions because the order of characters will be broken. These scenarios can be more complex and this kind of mask does not support shifting.

    Do not hesitate to contact us if you have other questions.

    Kind regards,
    Peter
    the Telerik team

    Q3’11 of RadControls for WinForms is available for download (see what's new). Get it today.

Back to Top