This is a migrated thread and some comments may be shown as answers.

AutocompleteBox SelectedItem

1 Answer 76 Views
AutocompleteBox
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Smile
Top achievements
Rank 1
Smile asked on 30 Aug 2013, 08:52 AM
Hello Telerik 


I have a problem I use telerikInput:RadAutoCompleteBox and I bind a list to suggestion source and I dont have SelectedItem property.
I need not only the text from it. I need to bind the whole selected item into a viewmodel to save

                            <telerikInput:RadAutoCompleteBox<br>
                                ActionButtonVisibility="Visible"<br>
                                EmptyFilterBehavior="ShowAll"<br>
                                Margin="-12,6,12,0"<br>
                                x:Name="RadAutoComplete"<br>
                                AutoCompleteMode="Contains"<br>
                                SuggestionsSource="{Binding AllFood}"<br>
                                FilterKeyPath="Name"<br>
                                AutoCompletePopupDisplayMode="AboveTextBox"<br>
                                SelectedText="{Binding SelectedFood_FoodGroup, Mode=TwoWay}"><br>
                                <telerikInput:RadAutoCompleteBox.SuggestionItemTemplate><br>
                                    <DataTemplate><br>
                                        <StackPanel><br>
                                            <TextBlock Text="{Binding Name}"/><br>
                                        </StackPanel><br>
                                    </DataTemplate><br>
                                </telerikInput:RadAutoCompleteBox.SuggestionItemTemplate><br>
                            </telerikInput:RadAutoCompleteBox>


I

1 Answer, 1 is accepted

Sort by
0
Deyan
Telerik team
answered on 02 Sep 2013, 08:16 AM
Hi,

There is a SelectedSuggestion property which returns you the last selected suggestion.

Regards,
Deyan
Telerik
Have a suggestion or face a problem - you can use the Ideas & Feedback portal to submit ideas, feedback and vote for them.
Tags
AutocompleteBox
Asked by
Smile
Top achievements
Rank 1
Answers by
Deyan
Telerik team
Share this question
or