AutocompleteBox SelectedItem

2 posts, 0 answers
  1. Smile
    Smile avatar
    1 posts
    Member since:
    Jul 2013

    Posted 30 Aug 2013 Link to this post

    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
  2. Deyan
    Admin
    Deyan avatar
    2039 posts

    Posted 02 Sep 2013 Link to this post

    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.
  3. DevCraft banner
Back to Top