I'll give just an example bellow:
<
telerik:RadMaskedNumericInput
HorizontalContentAlignment
=
"Left"
AutoFillZeros
=
"False"
IsClearButtonVisible
=
"False"
Mask
=
"n9.2"
InputBehavior
=
"Replace"
ErrorMessage
=
""
TextMode
=
"PlainText"
Value
=
"0"
/>
Problem 1: Whatever i do I'm getting a validation error "Required Input".
Problem 2: I'm unable to enter a negative amount. Nothing happens when i press the "-" sign
Problem 3: I focus the control and press Ctrl+A to select all the text. Then enter "90". On loosing focus i get the following string "90,,." which definitely does not look as number to me...
Problem 4: Focusing the control shows the full text including placeholders and separators. Do you think users will like this? For example if in the DB we have values as DECIMAL (18,2) basically we should set the mask to n18.2. Do you think the user will like to see 16 underscores and only 2 numbers at the end, instead of seeing only the IMPORTANT info that is the two numbers at the end???
I think it is not necessary to mention that the same problems exists in the Currency input...
I might understand this kind of behavior if the controls were marked with BETA, but if you think those controls are ready for production and are encouraging users to use them, well i think you missed something....
Regards,
Peter
31 Answers, 1 is accepted
Problem 5: Ctrl+A and Backspace to delete everything. After that Ctrl+A and i enter 90. What i get is 9.0?!?!?
Problem 6: Ctrl+A and enter "90" you get "90.". No ending zeros
Problem 7: Ctrl+A, enter 90, Ctrl+A, enter 90. you get "90_.__"
Problem 8: Ctrl+A, enter 90, Ctrl+A, enter 90, Ctrl+A, enter 90. You get "0.". What happened to my 90!?!?!?!
Thank you for your feedback. Going over the issues:
Problem 1: This error is shown because of the mask. The "n" token is a required one, so the position of this token has to be filled (not empty). Perhaps the token that you are looking for is "#", which is a not required digit token.
Problem 2 and 3 concern the InputBehavior property. As you are using a numerc input, you should probably be using the Insert option. Numeric values (as in the RadMaskedTextBox) are being inserted from right to left. In contrast, text values are being input from left to right.
Problem 4: The text when the control is focused is not necessarily the output text that you would get. The TextMode property controls whether the output text (the Text proeprty) would include the placeholder characters. Setting it to PlainText (as in your code snippet) you should not be seeing the placeholders. Moreover, you have an option to use an IValueConverter (ValueToTextConverter property) as well as the FormatString property, which uses the standard and custom numeric formatting strings. All of these would affect the value of the Text property. The only way you would get placeholders in the text value if you used the MaskedText option for the InputBehavior.
Problems 5 through 8 are again correlated to 2 and 3. The Replace mode of the InputBehavior will replace the character at the caret's position with the new characters. When you select all of the text, the caret is positioned at the beginning of the control. Pressing any number at that position will be positioned at the first positions from left to right.
According to your description and setup, I believe the most suitable configuration would be the following:
<
telerik:RadMaskedNumericInput
AllowSkipPlaceholders
=
"False"
AutoFillZeros
=
"False"
ErrorMessage
=
""
InputBehavior
=
"Insert"
IsClearButtonVisible
=
"False"
Mask
=
"#9.2"
FormatString
=
"n2"
TextMode
=
"PlainText"
Value
=
"0"
/>
Kind regards,
Alex Fidanov
the Telerik team
I've copied the code you indicated and here are the results:
Problem 1: Resolved
Problem 2: I'm still unable to enter "-" sign.
Problem 3: Lets say this is resolved but there is another problem will indicate bellow for Problem 6.
Problem 4: I'm not talking about the text that the user will see when the control lost focus. I'm talking about the text that the user sees when the control is focused. The user still sees the whole mask which in my example will mean that the user will see 16 underscores and 2 digits at the end. OK, on lost focus the control shows only the two digits but still while editing it is not very pleasant to the eye to see unimportant data.
Problem 5: Resolved
Problem 6: Now we have another interesting behavior here: Focus control and Ctrl+A, then enter 90. The control show the text as "90_.__". When the control looses focus the control shows 0.00. When i focus the control it again shows "90_.__"?!?!?!
Problem 7: Now have a the same result as Problem 8 - Ctrl+A, 90, Ctrl+A, 90 and you get "0.00"........
I did test my suggestions against the latest internal build. You may find a video capture of it here. The new issue that you are describing was resolved after the official release, so it might be that you are using it. Please test this with the latest internal build. I can confirm that the issue does not reproduce with 2011.1.322.1040.
Regarding 4, if you do not want to see the placeholders, your best option would be to set the following properties:
Placeholder=" "
AutoFillNumberGroupSeparators="False"
Regards,
Alex Fidanov
the Telerik team
Thanks for your help.
Thanks,
Tom
Currently, entering negative values is only supported with the subtract key in the NumPad. We are planning to provide support for the "OemMinus" key for the upcoming Service Pack. You can track the issue's progress logged for this from here.
Kind regards,
Alex Fidanov
the Telerik team
Regards,
Peter
Thanks
We already resolved this. This is likely to be included in today's internal build or definitely with the next one.
Kind regards,
Alex Fidanov
the Telerik team
<
telerik:RadMaskedNumericInput
AllowSkipPlaceholders
=
"False"
AutoFillZeros
=
"False"
ErrorMessage
=
""
InputBehavior
=
"Insert"
IsClearButtonVisible
=
"False"
Mask
=
"#9.2"
Placeholder
=
" "
AutoFillNumberGroupSeparators
=
"False"
FormatString
=
"n2"
TextMode
=
"PlainText"
Value
=
"0"
HorizontalContentAlignment
=
"Left"
/>
Problem 1: Enter the numeric input, enter 90, Ctrl+A, Ctrl+A. Everything in the numeric input is cleared, loosing focus does not return the 0.00
Problem 2: The minus key is totally not user friendly. You have made to work like a toggle button - meaning once the user presses the minus key the numeric input goes into negative amount entry and you can only enter negative amounts. Not to mention that if i want to enter -90, i need to first enter 90 and then press the - key. Do you think this is the way users enter amounts??? Normal people when they want to enter -90 they just press the minus key and then enter 90. This does not work like that in your controls.
Problem 3: In the above example if i enter -90 and loose focus the control shows "--90.00"!
We are definitely going to resolve problem 1. Problem 3 has already been resolved internally.
Regarding problem 2, the negative symbol is directly connected with the current value of the control and negative zero is parsed as a zero and there is no negative null value. This scenario is not currently supported.
Best wishes,
Alex Fidanov
the Telerik team
Also found a couple of other problems:
Problem 4: With InputBehavior=Insert the first digit works in replace mode. For example user enters 90. But he remember that he wants to input 190, so the logical is to position the caret before the 9 and press 1. When he does that your control change the value to 10! But when the cursor is at any other position than the first digit, it works in Insert mode. Definitely not very consistent behavior.
Problem 5: I enter 123.00. Position the caret between 1 and 2. Then press minus key. the caret then moves to the position before the 1. If u press minus key again the caret is returned to the original position. So basically the minus in front shifts the numbers left and right depending on whether it is visible or not
Regards,
Peter
Regards,
Peter
Issue 4 we have already fixed and will be available with the service pack.
Regarding Issue 5, we would appreciate if you share the result that you would expect from this scenario. Do you prefer the behavior as in the RadMaskedTextBox which will position the caret in the beginning or the caret's position should be persisted in the position before change?
Regards,
Alex Fidanov
the Telerik team
About the positioning i think it is best it to work as the RadMaskedTextBox.
And what about the other issue about the minus key working as a toggle button? Hope this is going to be addressed in the SP as well since it will be a major problem for most of the users.
Regards,
Peter
The issue regarding the positioning of the caret is logged here and we are going to resolve this taking into consideration your feedback and the behavior of other similar controls. The other issue is logged here.
I am afraid that both issues will not make it in the service pack as we are already in code freeze and the release is just around the corner. We apologize for the inconvenience.
Best wishes,
Alex Fidanov
the Telerik team
Regards,
Peter
The first issue is already resolved. The second is still in development and I cannot give you an exact time frame that this will be resolved in.
Regards,
Alex Fidanov
the Telerik team
Of course we don't want the user to see ___'___'___.___ when the curosr is focused.
Who like this ?
For me the solution Placeholder=" " AutoFillNumberGroupSeparators="False"
is not acceptable aswell because there are some spaces at the begining (and the sign - is separated from the digits)
Using Placeholder="" displays some little squares....
Any solution ?
There are no solutions to this scenario at the moment. However, we have logged a feature request to allow the MaskedInput controls to have no mask. When this feature is implemented, the described scenario will be supported. You can track the task's progress in our PITS.
Regards,
Tina Stancheva
the Telerik team
Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>
I see that task status is resolved in PITS. Could you tell me how can i hide masks when the cursor is focused ?
The 'no-mask' functionality of the RadMaskedInput controls is triggered when you set the Mask property: Mask="". You can find more informaiton about this feature in our documentation.
Regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
<
telerik:RadMaskedNumericInput
Width
=
"140"
Grid.Row
=
"3"
Grid.Column
=
"1"
Height
=
"20"
Margin
=
"0,5,0,5"
Padding
=
"0"
AutoFillNumberGroupSeparators
=
"False"
HorizontalAlignment
=
"Center"
HorizontalContentAlignment
=
"Left"
Mask
=
""
SelectionOnFocus
=
"SelectAll"
AllowSkipPlaceholders
=
"False"
InputBehavior
=
"Replace"
TextMode
=
"PlainText"
UpdateValueEvent
=
"LostFocus"
Value
=
"{Binding numericInput}"
IsClearButtonVisible
=
"False"
/>
We managed to reproduce this issue and we logged it in our PITS where you are able to track its status.
We also updated your telerik account points and we will try to fix this for the upcoming official Q1 Release next month.
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
-Vivek
This issue is already resolved and will be included in the Q1 in middle of February. Thanks again for your cooperation.
Regards,Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
Regards,
Vivek
You can use of the MaskedInputExtensions described in this help article. Basically, you can set this attached property:
<
telerik:RadMaskedNumericInput
maskedInput:MaskedInputExtensions.Minimum
=
"0"
/>
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.