I am using this control and am having negative feedback because users cannot type in .6 for example and get the control to display 0.6.
Instead if you type .6 the control actually displays 6.0. Is there anything that can be done about this??
Thanks.
<
RadMaskedNumericInput
Value
=
"{ Binding BgsPremiumRate, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True}"
FormatString
=
"n2"
InputBehavior
=
"Replace"
Mask
=
""
SelectionOnFocus
=
"SelectAll"
TextMode"PlainText" />
7 Answers, 1 is accepted
What stays behind this issue is that RadMaskedNumericInput should have a valid value in every moment and the valid values are:
- null
- double
So practically "." means nothing and that is why it is not displayed in no-mask NumericInput. In a normal MaskedNumeric Input where Mask in not "", users can type "." then 6 which will produce 0.6 if the initial value is 0.0.
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
- No underline under the number (achieved by using a Mask="")
- Any number of numbers to the right of the decimal place (not sure why this works, probably because there is no mask specified)
- A defined number of numbers to the left of the decimal place (achieved with FormatString="n2")
- .6 being treated as 0.6 (not currently working when Mask="")
It seems having a Mask creates the the underlining issue, and having no Mask creates the .6 issue so I can't achieve what I need. Is there no way to meet all my requirements?
Ironically all my requirements can be achieved with the standard WPF text box:
<
TextBox
Text
=
"{ Binding Age, Mode=TwoWay, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat=n2}"
/>
Since this TextBox's configuration works for you, you can consider using RadMaskedTextInput with Placeholder = " " (this will remove the underlining):
<
telerik:RadMaskedTextInput
Placeholder
=
" "
Text
=
"{ Binding Age, Mode=TwoWay, UpdateSourceTrigger=LostFocus, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat=n2}"
/>
Having non-fixed number of digits after the decimal point in NumericInput is still a feature request in our PITS. Greetings,
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
I'm now using the code below as you suggested. This doesn't restrict the number of digits after the decimal point to 2 as I thought it might and doesn't offer the comma formatting to illustrate thoudands. The RadMaskedNumericInput box is the closest I have come to providing what my client needs. Can I make a request for change to allow this box to accept .6 and then show 0.6 and not 6.0? Is there a request process for new features?
<
telerik:RadMaskedTextInput
IsClearButtonVisible
=
"True"
Text
=
"{ Binding Age, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, ValidatesOnExceptions=True, StringFormat=n2}"
Placeholder
=
" "
/>
I am little bit confused since you first needed this requirement:
Any number of numbers to the right of the decimal place (not sure why this works, probably because there is no mask specified)
but then you mentioned that the proposed settings do not restrict the numbers after the decimal point:
This doesn't restrict the number of digits after the decimal point to 2.
However, we created a PITS item for the requirement to process ".6" as 0.6 in NO-Mask Numeric input.
You can track its status and vote for it, this way increasing its development priority.
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Out of interest what is the general turn around time for these requests?
Thanks,
Alex
There is no typical time frame for our feature requests in PITS. However, the more votes they get the bigger is their development priority.
Kind regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.