Hello,
I can't remove token from their autocompletebox,when the token is too long (see the picture attached).
Here is my code :
<telerik:RadAutoCompleteBox runat="server" ID="radAutoCompleteBoxSelectionSite"
DropDownAutoWidth="Enabled" Filter="Contains" Visible="True" CausesValidation="False" AutoPostBack="True"
Width="100%" EmptyMessage="<%$ Resources:Language, SelectSite%>" InputType="Token"
OnEntryAdded="radAutoCompleteBoxSelectionSite_EntryAdded" TextSettings-SelectionMode="Single" OnClientLoad="onLoadAutoComplete" MinimumPrefixLength="0" >
</telerik:RadAutoCompleteBox>
And here is my script :
<script type="text/javascript">
function onLoadAutoComplete(sender, args) {
window.$telerik.$(sender.get_inputElement()).on('keypress', function (e) {
if (sender.get_entries().get_count() > 0) {
e.preventDefault();
}
});
}
</script>
I would like to stay in token mode and not in text mode. They still can delete the element with the keyboard but it's not enought clear. Is there any solution ?
Thanks