This question is locked. New answers and comments are not allowed.
I am using RadMaskedTextBox and it works perfectly with the exception that sometimes when the field becomes active, the user cannot type anything in the field. So I am trying to configure RadMaskedCurrencyInput the exact same way and I am having a bunch of problems.
What I really am looking for is a basic textbox with currency formatting. This is what I was using:
So this is my attempt:
This seems to work well when you first focus on this field and there is no data in the field. However if there is already data and it gets focus, it seems to work differently. For example, lets say I want to enter $123.45. That works fine the first time, but the next time you go to the field and type the same thing, it starts you at the beginning of the field and as soon as you hit the decimal point, it adds a space and becomes an invalid number.
I have tried different settings for the SelectionOnFocus, but I cannot get it to do what I want. If I have data in that field and I select it, I want all of the data selected and as I type, I want the existing data replaced. I don't want to have to worry about what position the cursor is in and if I hit the decimal point, it should treat it as such regardless of my position.
Am I using the wrong control for what I want? I seems like such a simple requirement.
What I really am looking for is a basic textbox with currency formatting. This is what I was using:
<
telerik:RadMaskedTextBox
Value
=
"{Binding TermPremium, Mode=TwoWay}"
HorizontalAlignment
=
"Right"
MaskType
=
"Numeric"
Mask
=
"c"
MinWidth
=
"80"
/>
So this is my attempt:
<
telerik:RadMaskedCurrencyInput
Value
=
"{Binding TermPremium, Mode=TwoWay}"
HorizontalAlignment
=
"Right"
MinWidth
=
"80"
IsClearButtonVisible
=
"False"
UpdateValueEvent
=
"LostFocus"
FormatString
=
"c2"
SelectionOnFocus
=
"SelectAll"
TextMode
=
"PlainText"
InputBehavior
=
"Insert"
AutoFillZeros
=
"False"
Placeholder
=
" "
AutoFillNumberGroupSeparators
=
"False"
AllowSkipPlaceholders
=
"False"
IsCurrencySymbolVisible
=
"False"
/>
This seems to work well when you first focus on this field and there is no data in the field. However if there is already data and it gets focus, it seems to work differently. For example, lets say I want to enter $123.45. That works fine the first time, but the next time you go to the field and type the same thing, it starts you at the beginning of the field and as soon as you hit the decimal point, it adds a space and becomes an invalid number.
I have tried different settings for the SelectionOnFocus, but I cannot get it to do what I want. If I have data in that field and I select it, I want all of the data selected and as I type, I want the existing data replaced. I don't want to have to worry about what position the cursor is in and if I hit the decimal point, it should treat it as such regardless of my position.
Am I using the wrong control for what I want? I seems like such a simple requirement.