radmaskedtextbox mask number with space

9 posts, 0 answers
  1. Jonathan
    Jonathan avatar
    15 posts
    Member since:
    Oct 2010

    Posted 26 Nov 2010 Link to this post

    Hi,

    I am trying to display a nine digit number with space after each 3 digits. So, I added this

    <

     

     

    telerik:RadMaskedTextBox Value="{Binding ACN, Mode=TwoWay}" UpdateValueEvent="LostFocus" Margin="2" Name="txtACN" IsEnabled="True" MaskType="Standard" Mask="### ### ###" EmptyContent="Enter ACN\ARSN here" ValueChanged="TxtAcnValueChanged" />

     


    I added ValueChanged event handler because I wanna set a flag internally that certain field changed in the page, like

        _stringBuilder.Append(

     

    " ACN,");

    Now the problem is, after page load textbox remains blank untill I click on it. Once click value gets display but unneccessarily ValueChanged event fires.
    The data column which binds to the control is of type int.

    Please help,
    Jono

     

  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 26 Nov 2010 Link to this post

    Hi Jonathan,

     The value not appearing is because of the UpdateValueEvent property being set to LostFocus. This is a known issue for us and currently, to get around this, you can use the code snippet provided here. Please note that we are currently refactoring the plumbing code of the RadMaskedTextBox. We have already covered the LostFocus issue and we will support inserting regular text inside the mask (as in your case "ACN,") - you will be able to add this to the mask directly without handling the ValueChanged event. The complete refactoring is due the upcoming Q.

    Regards,
    Alex Fidanov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  3. DevCraft banner
  4. Jonathan
    Jonathan avatar
    15 posts
    Member since:
    Oct 2010

    Posted 28 Nov 2010 Link to this post

    Thanks very much Alex.

    Another issue now is, after page load ValueChanged event is fired automatically for the textbox.
    Please suggest.

    Thanks,
     Jono
  5. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 29 Nov 2010 Link to this post

    Hello Jonathan,

    Have you tried subscribing to the event in the RadMaskedTextBox's Loaded event, or dispatching (Dispatchet.BeginInvoke() ) the code that subscribes to it? This should give enough time in order not to catch the first raising of this event.

    Sincerely yours,
    Alex Fidanov
    the Telerik team
    Browse the videos here>> to help you get started with RadControls for Silverlight
  6. Princee
    Princee avatar
    7 posts
    Member since:
    Feb 2012

    Posted 30 Apr 2014 Link to this post

    I am new to telerik controls .My question is related to RadMaskedTextBox .I am using this control with MaskType ="Numeric" and Mask ="d" and Value binding .My problem is when I am entering value then no issue but while removing if there is no content in the box then its a problem .Why this control is not taking null value.Please reply as soon as possible.


    Thanks 
  7. Petar Mladenov
    Admin
    Petar Mladenov avatar
    2891 posts

    Posted 30 Apr 2014 Link to this post

    Hello Medha,

    RadMaskedTextBox is Obsolete control and will be deleted in Q2 2014 Release. Furthermore it does not support properly null values. For this purpose we highly encourage you to use our RadMaskedNumericInput. Please check out this help article describing the upgrading steps you can follow.

    Regards,
    Petar Mladenov
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  8. Princee
    Princee avatar
    7 posts
    Member since:
    Feb 2012

    Posted 30 Apr 2014 in reply to Petar Mladenov Link to this post

    Hi Petar,
                  Thank you for reply.Surely we will move to MaskedInput control but currently by using converter we have fixed null issue.
  9. Princee
    Princee avatar
    7 posts
    Member since:
    Feb 2012

    Posted 02 May 2014 Link to this post

    Hi Petar,
                  I have moved to RadMaskedTextInput control but there are some issues . If there is no data in control its showing filter button with cross mark and If  I have removed typed data , underscore sign is appearing with message enter a value .How to use this control with only numeric data without any underscore sign and messages.

    Please let me know if I am missing anything .



        
  10. Tsvetie
    Admin
    Tsvetie avatar
    1517 posts

    Posted 05 May 2014 Link to this post

    Hi Medha,

    You can use the IsClearButtonVisible property of the RadMaskedNumericInput control to show/hide the clear button. For example:

    <telerik:RadMaskedNumericInput IsClearButtonVisible="False"

    Regarding removing the placeholder symbol, you can use one of the suggestions in this forum post, or set a char that suits your needs using the Placeholder property. For example:

    <telerik:RadMaskedNumericInput.Placeholder>
        &#x2060;
        <!--Unicode Character 'WORD JOINER'' (U+2060)-->
    </telerik:RadMaskedNumericInput.Placeholder>

    Regards,
    Tsvetie
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner