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

AutoCompleteBox in ControlTemplate failed to get SelectedItem on ViewModel

1 Answer 16 Views
AutoCompleteBox
This is a migrated thread and some comments may be shown as answers.
Jerry
Top achievements
Rank 1
Jerry asked on 05 Sep 2018, 04:07 AM
Good day, I have this autocompletebox on my context menu, but after searching, I couldn't to get any SelectedItem, any idea to do it ?

1 Answer, 1 is accepted

Sort by
0
Jerry
Top achievements
Rank 1
answered on 05 Sep 2018, 04:12 AM

 <DataTrigger Binding="{Binding Name}" Value="Test">
                    <Setter Property="Template">
                        <Setter.Value>
                            <ControlTemplate>

                                <telerik:RadAutoCompleteBox  
                                x:Name="FindColumnBox" 
                                Width="200" 
                                ItemsSource="{Binding Source={StaticResource gridtesting}}"
                                Height="30" 
                                SelectionMode="Multiple"
                                DisplayMemberPath="Name"
                                AutoCompleteMode="SuggestAppend"
                                SelectedItem="{Binding SelectedSearchItem , Mode=TwoWay}"
                                 
                                >
                                </telerik:RadAutoCompleteBox>
                       
                            </ControlTemplate>
                        </Setter.Value>
                        
                    </Setter>
                    
                </DataTrigger>

 

After I Add SelectedItem n TwoWay Mode also failed to get SelectedItem in my ViewModel....any idea?

Tags
AutoCompleteBox
Asked by
Jerry
Top achievements
Rank 1
Answers by
Jerry
Top achievements
Rank 1
Share this question
or