Unable to search combobox items when item source is observable collection.

Would like to able able to type and have combo box jump to letters typed. Below is my xaml that does not allow for this, as I type nothing happens in the combo box. Items source is an observable collection.


<Custom3:SfComboBox Grid.Row="2" Grid.Column="3" x:Name="cboTubularTypeFilter" ItemsSource="{x:Bind ViewModel.TubularTypeNames, Mode=OneWay}" Width="150"

                                                HorizontalAlignment="Left" Margin="5" VerticalAlignment="Top" FontSize="14" SelectionChanged="cboTubularTypeFilter_SelectionChanged"

                                                IsTextSearchEnabled="True" SelectedItem = "{x:Bind ViewModel.TubularTypeNameFilter, Mode=TwoWay}">

                                <Custom3:SfComboBox.ItemTemplate>

                                    <DataTemplate>

                                        <StackPanel Orientation="Vertical">

                                            <TextBlock Text="{Binding TubularTypeName}" />

                                        </StackPanel>

                                    </DataTemplate>

                                </Custom3:SfComboBox.ItemTemplate>

                            </Custom3:SfComboBox>


1 Reply

TB Thirupathi Bala Krishnan Syncfusion Team October 8, 2021 01:49 PM UTC

Hi Wayne, 
 
Thanks for contacting Syncfusion support. 
 
We have analyzed your reported query "Unable to search combobox items when the item source is an observable collection." This criterion can be met by making the following code changes in your application. In your application, you must set the ComboBoxMode value to Editable. Based on the ObservableCollection, we created a simple sample. 
 
Please refer the following code sample. 
 
# MainPage.xaml 
 
        <syncfusion:SfComboBox x:Name="EmployeesCombo" Watermark="Type here" 
                               ItemsSource="{Binding PersonDetails}" 
                               DisplayMemberPath="Name" 
                               ComboBoxMode="Editable" 
                               Margin="10" Width="380" Height="35" 
                               HorizontalAlignment="Left"  VerticalAlignment="Top"> 
            <syncfusion:SfComboBox.ItemTemplate> 
                <DataTemplate> 
                    <Grid> 
                        <StackPanel Orientation="Vertical"> 
                            <TextBlock Text="{Binding Name}" FontSize="14"/> 
                        </StackPanel> 
                    </Grid> 
                </DataTemplate> 
            </syncfusion:SfComboBox.ItemTemplate> 
             
        </syncfusion:SfComboBox> 
 
 
 
 
Please let us know if you need any further assistance. 
 
Regards,
Thirupathi B.
 


Loader.
Up arrow icon