This is a migrated thread and some comments may be shown as answers.

RadMaskedNumericInput showing only fixed length given in the Mask

3 Answers 347 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Lakshmi
Top achievements
Rank 1
Lakshmi asked on 12 Dec 2013, 01:07 PM

Hi, 
  
   I have been using the RadMaskedTextBox with MaskType "Numeric" and am getting an issue "Input string not in correct format" when following the below steps:

1) Enter a number
2) Modify the number to a negative value (-)
3) Delete the number using BackSpace
 
  i.e., Exception thrown with negative symbols.

As a workaround to this issue , telerik forums suggested to use RadMaskedNumericInput instead. But there comes another issue that I have to give fixed number of digits only in the Mask.

My concerns are :-

1) How to give the mask if the maximum number of numeric places is 18 and decimal digits as 2 ( say for eg., 123456789122345567.55)? 
2) Is there any alternative other than giving mask?
3) Can I give negative symbols as well ? If so, will it figure out the exception thrown with negative symbols.

Please help to figure out this issue..

Thanks

3 Answers, 1 is accepted

Sort by
0
Petar Mladenov
Telerik team
answered on 17 Dec 2013, 08:11 AM
Hello Lakshmi,

I think you can use the following configuration:
<telerik:RadMaskedNumericInput
           Mask=""
           FormatString="n2"
           maskedInput:MaskedInputExtensions.MaxTextLength="18"
           />
where maskedInput namespace is:
xmlns:maskedInput="clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
This will enable the following:
  • No underscores - because the Mask is "" (no-mask functionality)
  • 18 digits max on the left of the decimal place
  • group separators will show on the go while typing
  • FormatString n2 determines the number of digits on the right of the decimal symbol

We hope this is exactly what you need.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Lakshmi
Top achievements
Rank 1
answered on 17 Dec 2013, 09:03 AM

  Thanks for your timely support.

I have 2 more queries in this section:-

1) Why the digits after decimal places not getting updated or inserted when we enter maximum number of digits( say 18) to the left of the decimal places.
2) Also , how to replace the digits while entering similar to RadMaskedTextBox ?
i.e., it is not replacing digits as we are entering instead we need to select the digits that we need to replace.


 Please help !!
0
Petar Mladenov
Telerik team
answered on 20 Dec 2013, 08:03 AM
Hello Lakshmi,

MaskTextLength is mostly designed to work with RadMaskedTextInput and I have to admit that I have mislead you. In NumericInput it currently works the following way - if the Value is about to exceed the max text length you have set, the value changing is prevented. That is why typing a digit is not allowed - because inserting digit will make the Value bigger than 6 symbols. On the other hand, actual ReplaceMode does not work in No-Mask scenarios with MaxTextLength set - we will try to improve this behavior in some of our future releases.
However, sice you need to use > 15 digits we want to suggest you to use the RadMaskedCurrencyInput which works with decimals. You can try the following setting:
<telerik:RadMaskedCurrencyInput
                 Mask="#18.2"
                 AutoFillNumberGroupSeparators="False"
                 IsCurrencySymbolVisible="False"
                 Placeholder=" "/>
Please let us know if this is suitable for you.

Regards,
Petar Mladenov
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
General Discussions
Asked by
Lakshmi
Top achievements
Rank 1
Answers by
Petar Mladenov
Telerik team
Lakshmi
Top achievements
Rank 1
Share this question
or