Hi,
In my application, i have requirement where
when user types in text in combobox and moves out(lost of focus), if the text is not in ItemList, this text must be added in ItemList.
I have used
void Control_LostFocus(object sender, RoutedEventArgs e)
{
if (!Duplicate(this.Text))
{
Control.Items.Insert(0, (new RadComboBoxItem() { Content = This.Text}));
}
}
It works fine in most of the situation but in the case where, say "AAA" is already in ItemList, I type "A" and move out...
'A' doesn't get inserted because, this.Text returns "AAA" not "A".
So, my question is can i get the typed text from ComboBox.?
I tried
TextBox textBox = this.ChildrenOfType<TextBox>()[0];
string text = textBox.SelectedText; //textBox.Text //non of them gave Typed text.
But strangely when I use this code, the ComboBox stops opening\displaying items.
Rdgs
Afla