I am upgrading from Q3 2011 to Q2 2012 and ran into a problem with the numeric input. I cannot enter a negative value into my textboxes. It doesn't throw an error - it just ignores the negative sign. I have tried the number pad and the regular keyboard and I have tried entering the negative first and entering it last. Nothing seems to work.
See below for an example of one of the text boxes. I checked the value in the validator and it is positive there so it isn't the validator changing the value.
See below for an example of one of the text boxes. I checked the value in the validator and it is positive there so it isn't the validator changing the value.
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Units}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
Width
=
"80"
IsReadOnlyBinding
=
"{Binding HideUnits}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Units"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtUnits"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"Units"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:DoubleValidationRule
Min
=
"-100000000.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
7 Answers, 1 is accepted
0
Hi Koren,
Please accept our apology for this inconvenience. This is a known issue that was introduced with the Q2 2012 release. However, we've already addressed it in our latest internal build.
And until the next official release is out, you can set the minimum and maximum value of the control as a workaround:
Give this a try and let us know if it helps.
Kind regards,
Tina Stancheva
the Telerik team
Please accept our apology for this inconvenience. This is a known issue that was introduced with the Q2 2012 release. However, we've already addressed it in our latest internal build.
And until the next official release is out, you can set the minimum and maximum value of the control as a workaround:
<
telerikInput:RadMaskedNumericInput
xmlns:ext
=
"clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
x:Name
=
"txtUnits"
ext:MaskedInputExtensions.Maximum
=
"2147483647"
ext:MaskedInputExtensions.Minimum
=
"-2147483648"
IsClearButtonVisible
=
"False"
KeyboardNavigation.TabNavigation
=
"Local"
Mask
=
"#9.2"
SelectionOnFocus
=
"SelectAll"
SpinMode
=
"None
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
Value
=
"5"
>
...
</
telerikInput:RadMaskedNumericInput
>
Give this a try and let us know if it helps.
Kind regards,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
![](/forums/images/avatarimages/default.gif)
Koren
Top achievements
Rank 1
answered on 10 Jul 2012, 03:05 PM
This helped a little. However, I can't type in the negative sign first like we could before. I can type in 3- but not -3. This will be confusing for our users who are used to it working either way.
Thanks.
Thanks.
0
Hello Koren,
Petar Mladenov
the Telerik team
In a sample scenario am not able to reproduce such issue (you can heck out the attached sample).
Do you use custom culture? If yes, you can check out this msdn page describing the different CurrencyNegativePatterns you can have. In the code behind of the attached project you can also see how to define custom culture (the commented lines in the MainWindow.xaml.cs).
Petar Mladenov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
0
![](/forums/images/avatarimages/default.gif)
Koren
Top achievements
Rank 1
answered on 13 Jul 2012, 01:54 PM
The sample you sent did not have the numeric input in a column of a telerik gridview.
here is an example...
here is an example...
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Units}"
DataFormatString
=
"{}{0:f2}"
IsFilterable
=
"False"
Width
=
"80"
IsReadOnlyBinding
=
"{Binding HideUnits}"
>
<
telerik:GridViewDataColumn.Header
>
<
TextBlock
Text
=
"Units"
TextWrapping
=
"Wrap"
/>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerikInput:RadMaskedNumericInput
x:Name
=
"txtUnits"
Mask
=
"#9.2"
SpinMode
=
"None"
IsClearButtonVisible
=
"False"
SelectionOnFocus
=
"SelectAll"
KeyboardNavigation.TabNavigation
=
"Local"
TextMode
=
"PlainText"
Validation.ErrorTemplate
=
"{StaticResource TextBoxErrorTemplate}"
telerikMaskedInput:MaskedInputExtensions.Minimum
=
"-2147483648"
telerikMaskedInput:MaskedInputExtensions.Maximum
=
"2147483648"
>
<
telerikInput:RadMaskedNumericInput.Value
>
<
Binding
Path
=
"Units"
Mode
=
"TwoWay"
UpdateSourceTrigger
=
"LostFocus"
>
<
Binding.ValidationRules
>
<
imKASHelper:DoubleValidationRule
Min
=
"-100000000.00"
Max
=
"100000000.00"
/>
</
Binding.ValidationRules
>
</
Binding
>
</
telerikInput:RadMaskedNumericInput.Value
>
</
telerikInput:RadMaskedNumericInput
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
0
![](/forums/images/avatarimages/2f89248a-331d-440e-b02e-0b70c389a3cddbfb48f2d5d8910a3951ba14a7d76b8e.jpeg)
Nathan J Pledger
Top achievements
Rank 2
answered on 16 Jul 2012, 01:39 PM
Hi Tina and Petar,
I am also having this issue.
My XAML:
I find it concerning that your product has essentially regressed, so your unit testing/use of your own test tools is perhaps not as stringent as it could be?
However, that aside, without any fixes/workarounds that ultimately may impact the quality of our product, when can we expect a fix?
Thanks,
Nathan
I am also having this issue.
My XAML:
<
telerik:RadMaskedCurrencyInput
FormatString
=
"#9.2"
SelectionOnFocus
=
"SelectAll"
SpinMode
=
"None"
UpdateValueEvent
=
"PropertyChanged"
Value
=
"{Binding NetPricePerUnit, Mode=TwoWay, UpdateSourceTrigger=Explicit}"
/>
I find it concerning that your product has essentially regressed, so your unit testing/use of your own test tools is perhaps not as stringent as it could be?
However, that aside, without any fixes/workarounds that ultimately may impact the quality of our product, when can we expect a fix?
Thanks,
Nathan
0
Hello guys,
Firstly I want to assure you that this issue is already fixed and you can both test it with the latest internal build. The fix will be officially out with the upcoming Q2 2012 SP1 release.
@Nathan - in the meantime you can use the same workaround I suggested to Koren:
I also noticed that you've defined a FormatString for the control - by default the Mask of the CurrencyInput control is #9.2 so you don't really need to apply any kind of FormatString properties.
@Koren - I wasn't able to reproduce the issue but I noticed that the Width you've applied on the GridViewDataColumn is too small and it can't display the minus sign in front of the control. So I changed that Width to 100 and I was able to successfully set and see the minus sign as soon as I enter the cell for editing. I attached my solution so that you can have a look at it and let me know if it works for you.
All the best,
Tina Stancheva
the Telerik team
Firstly I want to assure you that this issue is already fixed and you can both test it with the latest internal build. The fix will be officially out with the upcoming Q2 2012 SP1 release.
@Nathan - in the meantime you can use the same workaround I suggested to Koren:
<
telerik:RadMaskedCurrencyInput
xmlns:telerikMaskedInput
=
"clr-namespace:Telerik.Windows.Controls.MaskedInput;assembly=Telerik.Windows.Controls.Input"
SelectionOnFocus
=
"SelectAll"
SpinMode
=
"None"
telerikMaskedInput:MaskedInputExtensions.Maximum
=
"2147483648"
telerikMaskedInput:MaskedInputExtensions.Minimum
=
"-2147483648"
UpdateValueEvent
=
"PropertyChanged"
Value="{Binding NetPricePerUnit,
Mode
=
TwoWay
,
UpdateSourceTrigger
=
Explicit
}" />
@Koren - I wasn't able to reproduce the issue but I noticed that the Width you've applied on the GridViewDataColumn is too small and it can't display the minus sign in front of the control. So I changed that Width to 100 and I was able to successfully set and see the minus sign as soon as I enter the cell for editing. I attached my solution so that you can have a look at it and let me know if it works for you.
All the best,
Tina Stancheva
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
![](/forums/images/avatarimages/default.gif)
Koren
Top achievements
Rank 1
answered on 18 Jul 2012, 06:07 PM
That appears to work. I will have to adjust the width of all my grid columns with numeric input. The negative must have been right beside the number before rather than at the front like it is now.
Thanks!
Thanks!