As the other post mentioned in the current version of the AutoComplateBox control there is a know issue that causes the SearchText property to not be updated after selection is made. When the issue is resolved this property will be updated to represent the selected item in the control which would cause the inputted text to not be available after selection. Could you describe to us in more details the cases in which being able to access that entered text would be useful in order for us to see all useful cases and possibly implement such functionality that will allow to access that text in the future versions of RadAutoComplateBox.
About your questions on how to add new items you could use the KeyDown
event of the control and then in to code behind just add a new item if it doesn't exist in the ItemsSource collection. The next code snippet shows how the KeyDown should look like:
and in the code behind:
sender, KeyEventArgs e)
var autoCompleteBox = sender
var inputText = autoCompleteBox.SearchText;
var itemsSource = autoCompleteBox.ItemsSource
(e.Key == Key.Enter && !itemsSource.Contains(inputText))
autoCompleteBox.ItemsSource = itemsSource;
autoCompleteBox.SelectedItem = inputText;
Hope this is helpful.
the Telerik team