Please let me know where I am going wrong!
I've tried many ways, but for some reason when I test my maskedit field, I can't type anything in. No values are displayed as I type and the IFrame cursor doesn't move as I type. I can only Tab off the field.
Input: 1 - 999
-----------------------------
Mask: nnn
Type: Numeric
Prompt Char: 0
---------------------------
On line 7 below, the field doesn't get set to "001"
01.
Private
Sub
mtxtDaysElapsed_Validating(sender
As
Object
, e
As
System.ComponentModel.CancelEventArgs)
Handles
mtxtDaysElapsed.Validating
02.
'between 1 and 999 exclusive
03.
Dim
nDaysElapsed = 0
04.
05.
Try
06.
If
mtxtDaysElapsed.Value =
""
Or
mtxtDaysElapsed.Value =
"0"
Then
07.
mtxtDaysElapsed.Value =
"001"
08.
End
If
09.
If
Integer
.TryParse(mtxtDaysElapsed.Value, nDaysElapsed)
Then
10.
recPoVenmst.LateCutoffDays = nDaysElapsed.ToString
11.
Else
12.
e.Cancel =
True
13.
End
If
14.
Catch
ex
As
Exception
15.
'error
16.
End
Try
17.
End
Sub
5 Answers, 1 is accepted
I'm getting the same issue when I try anything with a Numeric mask type. The IFrame cursor doesn't move as I type in the field, when I enter valid characters.
Here is an example that I tried:
Culture: en-us
Mask: #0.00
MaskType: Numeric
What is causing this issue where I can't type in a value?
Thank you for writing.
The numeric mask can be used for general number formatting. For example, you can set the mask to "N2" and you will be able to add type a number. You should choose a standard number format string: Standard Numeric Format Strings.
This MaskType is not suitable when you want to restrict the user to enter a number with a specific length. For this you can use a standard mask:
radMaskedEditBox1.MaskType = MaskType.Standard;
radMaskedEditBox1.Mask =
"###"
;
I hope this will be useful. Let me know if you have additional questions.
Regards,
Dimitar
Telerik by Progress
Dear Dimitar,
I'm facing the same issue and realized that if you bind the MaskedEditBox to a null value you can not type anything in..
Please test below code (StockTypeId should be Null value)..
ps: If you test the same code with StockTypeId as an other than a null value, you will be able to write in...
radMaskedEditBox1.MaskType = Telerik.WinControls.UI.MaskType.Numeric
radMaskedEditBox1.Mask = "N1"
radMaskedEditBox1.DataBindings.Add("Value", somedatasource, "StockTypeId")
I was able to reproduce this and indeed this is an issue introduced with the latest version of the controls (it is caused by a fix for another issue). The issue is already logged in our portal. Here are the details: UI for Winforms Feedback Portal - FIX.RadMaskedEditBox - the user is not allowed to enter a numeric value if the initial value is null is simple data binding is used.
New version release is planned for 16 November and the fix will be available in it.
Should you have any other questions do not hesitate to ask.
Regards,
Dimitar
Telerik by Progress