Example when AutoCompleteSource values are 111890, 57869, 42356:
- User enters "11".
- Textbox value is appended to show "111890".
- User tabs out of textbox.
- Textbox value now displays "11".
Desired scenario:
- User enters "11".
- Textbox value is appended to show "111890".
- User tabs out of textbox.
- Textbox value now displays "111890".
If the mask type is set to none, the desired scenario is met.
Please advise. Is there simply a property I have set incorrectly? Is this a bug? Or is not supported/implemented?
9 Answers, 1 is accepted
May I ask what version of the controls you are using? I have tested this under the latest version and I am unable to replicate it.
Here is how I have it set up
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Clear()
Me
.RadMaskedEditBox1.MaskType = MaskType.Numeric
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"111890"
)
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"57869"
)
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"42356"
)
Me
.RadMaskedEditBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
Me
.RadMaskedEditBox1.AutoCompleteMode = AutoCompleteMode.Append
and after entering 11, it appends the remaining ..1890 and when I tab away, it is left as 111890 which is correct.
hope this helps
richard
How did you get on with this? If it helped, please remember to mark as answer. If you need more assistance, please just let me know. ]
thanks
Richard
Me
.RadMaskedEditBox1.Mask =
"#"
If I removed the mask being set to "#", the tabbing/clicking works as expected. However, the "value" property returns the previous value, even if I type the full value. The "text" property does return the correct value.
If I keep the mask set to "#", the value and text property are both set correctly. However, then the tabbing/clicking stops working as expected.
the # mask is as far as I'm aware for use with a mask type of Standard. Have a look at this link.
To have this working I would advise
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Clear()
Me
.RadMaskedEditBox1.MaskType = MaskType.Numeric
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"111890"
)
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"57869"
)
Me
.RadMaskedEditBox1.AutoCompleteCustomSource.Add(
"42356"
)
Me
.RadMaskedEditBox1.AutoCompleteSource = AutoCompleteSource.CustomSource
Me
.RadMaskedEditBox1.AutoCompleteMode = AutoCompleteMode.Append
and getting the required value by
Private
Sub
RadMaskedEditBox1_Leave(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.EventArgs)
Handles
RadMaskedEditBox1.Leave
MessageBox.Show(
Me
.RadMaskedEditBox1.Text)
End
Sub
hope that helps, but let me know if you have any other questions
Richard
In the meantime, I have removed the "#" mask value and changed my code to use "text" property.
I agree that the value property should be updated and it's confusing that it isn't. I'm glad this has solved your issue though. If you found that this has helped, please mark as answer so others can find the solution too.
Best regards,
Richard
Thank you for writing.
As per the documentation: "Value: This property returns user input without the formatting characters. If you want the input and the formatting characters, use the Text property."
This means that when you have a mask for currency (i.e. "C") and you type 5 in the MaskedEditBox control, the value property will return "5" while the Text property will return "$5".
However, the "#" mask that you have set should allow only one digit (or space) in the mask editor. Since this is not the case, this means that we have an issue in this scenario. I have logged the issue in our PITS and we will address it in a future release.
For the time being, as you already found out, you can remove the mask and stay with a Numeric MaskType.
@Jason Parrish. Thank you for reporting this case. It helped us to discover the issue. Your Telerik points have been updated.
@Richard. Thank you for the community effort, you points have also been updated.
Should you guys have any other questions, do not hesitate to write back.
Sincerely yours,
the Telerik team
Hi Kendo Team,
I have the same situation using in Kendo UI Masked control with AutoComplete. If I masked the auto complete control, it does not filter desire result from the autocomplete data list. Is this a bug in kendo that Maked control can not work with Autocomplete ?? Here is my code, please provide solution if possible -
<div class="demo-section k-content">
<h4><label for="Phones">Choose phone#:</label></h4>
</div>
<script>
$(document).ready(function () {
var data = [
"7001",
"7001.34.32",
"7001.34.32.22",
"7001.34.3",
"7031.34.32"
];
//create AutoComplete UI component
$("#phones").kendoAutoComplete({
dataSource: data,
filter: "contains",
placeholder: "Select Phone#..."
});
$("#phones").kendoMaskedTextBox({
mask: "0000.00.00.00"
});
});
</script>
I would like to note that this forum is related to the Telerik Ui for WinForms suite. However, it seems that your question is related to Kendo UI. That is why I would kindly ask you to post your technical questions in the relevant forum: https://www.telerik.com/forums
Thus, the appropriate support engineers and forum community will gladly assist you. Thank you for your understanding
Regards,
Dess | Tech Support Engineer, Sr.
Progress Telerik