Cannot show leading zeros with RadMaskedNumericInput

4 posts, 0 answers
  1. Lu
    Lu avatar
    2 posts
    Member since:
    Nov 2018

    Posted 11 Mar Link to this post

    I'm trying to only allow users to type in 6 digits integer with prefix "CA", and now I can only type in one leading zero, not multiple zeros. 

    Here is my code, and ProjectNumber is a nullable double. 

    <telerik:RadMaskedNumericInput                     

    Grid.Column="0"                   

    Margin="25, 0, 0, 10"                    

    Width="100"                   

    Mask="CA#####"                   

    Placeholder=""                            

    AutoFillZeros="False"                   

    AutoFillNumberGroupSeparators ="False"                   

    IsClearButtonVisible="False"                                       

    AllowInvalidValues="True"                   

    Validation.ErrorTemplate="{x:Null}"                   

    maskedInput:MaskedInputExtensions.Minimum="0"                     

    HorizontalContentAlignment="Left"                   

    HorizontalAlignment="Left"                                        

    Value="{Binding Path=(viewModel:IProjectFolderViewModel.ProjectNumber), Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>

     

    Also, the prefix 'CA' only appears after users click on the input box or type in something. is there anyway that we could show the prefix all the time. 

  2. Lu
    Lu avatar
    2 posts
    Member since:
    Nov 2018

    Posted 12 Mar Link to this post

    Anyone can help??
  3. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2420 posts

    Posted 16 Mar Link to this post

    Hello Lu,

    I will check this and share my findings later today or tomorrow.

    Regards,
    Martin Ivanov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Martin Ivanov
    Admin
    Martin Ivanov avatar
    2420 posts

    Posted 19 Mar Link to this post

    Hello Lu,

    RadMaskedNumericInput doesn't support leading zeroes. Instead you can use  RadMaskedTextInput with only numeric values allowed.

    About the disappearing CA prefix I wasn't able to reproduce this on my side using the latest version of Telerik UI for WPF.

    Regards,
    Martin Ivanov
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top