I suggest "AllowFreeText" boolean property for the combo box. If it is set to "False", there should be a beep and not accept the character which results in no match. Also Backspace should remove a user typed characer and append the matching list item.
I use the following VB (AutoCompletionMode - "Append") code to handle Invalid character and backspace
Private Sub cboDepartment_KeyUp(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles cboDepartment.KeyUp
Dim Lg As Integer
Dim ComboItem As RadComboBoxItem
Lg = sender.text.length
If Lg = 0 Then
Exit Sub
End If
If (sender.finditem(sender.text)) Is Nothing Or e.KeyCode = 8 Then
If Lg = 1 Then
sender.text = ""
Exit Sub
Else
sender.text = sender.text.substring(0, Lg - 1)
End If
If e.KeyCode <> 8 Then
Beep()
End If
ComboItem = sender.finditem(sender.text)
sender.text = ComboItem.Text
sender.SelectionStart = Lg - 1
sender.SelectionLength = sender.Text.Length - (Lg - 1)
End If
End Sub
Better code suggestions will be highly appreciated.
Regards ... DP