some questions about RadMaskedNumericInput

2 posts, 0 answers
  1. Zhang
    Zhang avatar
    13 posts
    Member since:
    Oct 2013

    Posted 06 Dec 2015 Link to this post

    my requirement as below:

    1:  Don't display the underline and thousand-separator when the text box is focused

    2: If the number typed is bigger than one thousand, it will fill  thousand-separator automatically (the text box is still being focused).For example, if I type in 123,then it displays as 123.00;then I input the fourth  number 7,I want it displays as 1,237.00 immediately(not only after the text box lost focused). it's important that keeping  then cursor position be after the number 7.

    3:when the entire content is selected and I delete it,the value of the the text box should be zero and displays as 0.00

     many thanks

  2. Peshito
    Peshito avatar
    522 posts

    Posted 08 Dec 2015 Link to this post

    Hi Zhang

    Not displaying the thousand separator and the underline when the control is not being focused is possible with the following combination of properties: Placeholder=" " and AutoFillNumberGroupSeparators="False".

    In order to customize the way your masked control behaves when entering input, use the Mask property, for instance like this Mask="#4.2".

    As for the question about showing 0.00 when the input is selected and then deleted, this can be achieved with the help of MaskedInputExtensions. Include the extensions' namespace first xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input" and then set the AllowNull property to False.

    Below is a sample showing the above approach:
                        Placeholder=" "

    Hope this helps.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top