4 Answers, 1 is accepted
0
Princy
Top achievements
Rank 2
answered on 15 Mar 2013, 10:07 AM
Hi Abhi,
Please have a look into the following C# code.
C#:
Thanks,
Princy.
Please have a look into the following C# code.
C#:
private void radAutoCompleteBox1_LostFocus(object sender, RoutedEventArgs e){ string selectedItemText = radAutoCompleteBox1.SelectedItem.ToString();}Thanks,
Princy.
0
Abhi
Top achievements
Rank 1
answered on 15 Mar 2013, 12:33 PM
Thanks for reply
My exact problem is:
For Example : If we have 3 colors in ColorList
1.Red
2.Green and
3.blue (ItemSource to AutocompleteBox is ColorList)
after selecting the Item from the List (for example => I'll select Green)
Now, If I select part of the Text "ree" from "Green"
How to get this "ree" in Lost_Focus Event of AutoCompleteBox (selectedTex in the selectedItem)
pls give any solution for this............
My exact problem is:
For Example : If we have 3 colors in ColorList
1.Red
2.Green and
3.blue (ItemSource to AutocompleteBox is ColorList)
after selecting the Item from the List (for example => I'll select Green)
Now, If I select part of the Text "ree" from "Green"
How to get this "ree" in Lost_Focus Event of AutoCompleteBox (selectedTex in the selectedItem)
pls give any solution for this............
0
Hi,
In order to get the selected text in the textbox portion of the control you will have to get the TextBox element and use directly its SelectedText property.
Greetings,
Ivo
the Telerik team
In order to get the selected text in the textbox portion of the control you will have to get the TextBox element and use directly its SelectedText property.
var autoComplete = (RadAutoCompleteBox)sender;var textBox = autoComplete.ChildrenOfType<TextBox>().First();string selectedText = textBox.SelectedText;Ivo
the Telerik team
Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.
0
Abhi
Top achievements
Rank 1
answered on 19 Mar 2013, 06:23 AM
HI Ivo,
Thanks I got it..........
Thanks I got it..........