Autocomplete

Dear support team,

I am trying to implement autocomplete and filtering on a SfMultiColumnDropDownControl in a WPF application.

I have set in xaml:

<syncfusion:SfMultiColumnDropDownControl
                Grid.Column="2"
                x:Name="UZOVISelection"
                AllowAutoComplete="True"
                AllowCaseSensitiveFiltering="False"
                AllowImmediatePopup="True"
                AllowIncrementalFiltering="True"
                AutoGenerateColumns="False"
                DisplayMember="DisplayName"
                SearchCondition="Contains"
                ItemsSource="{Binding UZOVIPartyItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                SelectedItem="{Binding SelectedUzoviItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}">               
                <syncfusion:SfMultiColumnDropDownControl.Columns>
                    <syncfusion:GridTextColumn MappingName="DisplayName"/>
                    <syncfusion:GridTextColumn MappingName="UZOVICode"/>
                    <syncfusion:GridTextColumn MappingName="Name"/>
                </syncfusion:SfMultiColumnDropDownControl.Columns>
            </syncfusion:SfMultiColumnDropDownControl>


The dropdown populates and I can select an item, but typing text is not autocompleted and also the list (based on the ItemsSource) is not filtered based on the value in the text box. I have been trying to follow the pattern in the .Net Core Demos (syncfusion.dropdowndemos.wpf.MultiColumnDropDownDemo, MultiColumnControl1), but am a little lost.

I was expecting a reliance on http://schemas.microsoft.com/xaml/behaviors but do not find any mention of that in the example. The ViewModel in the demo only contains an ObservableCollection<GrossingMoviesList>. The GrossingMoviesList class implements NotificationObject, but I don't expect that to be a requirement for filtering.

If you see anything that I missed or if you can tell me how to explicitly trigger the autocomplete filtering , please let me know.

Kind regards,

Niels van Strien

5 Replies

NV NM van Strien April 12, 2021 06:17 PM UTC

Please also note that in the documentation, it is suggested to reference Syncfusion.SfShared.WPF, but in the release notes of v19.1.0.54 it is suggested that this assembly is no longer used.

see: https://help.syncfusion.com/wpf/autocomplete/getting-started


NV NM van Strien April 12, 2021 08:07 PM UTC

I have been able to achieve my goal by using SfTextBoxExt. If I define in xaml the SfTextBoxExt as shown below, it provides a solution to me. This leaves me with a bit of a mystery why the other approach did not work.

Note that the ShowClearButton="True" on the SfTextBoxExt solution does not show a clear button. Enabling this option in the syncfusion stock demo code syncfusion.dropdowndemos.wpf.AutoCompleteDemo, also does not show a clear button.

If the ShowClearButton function should work with SfTextBoxExt, please verify if this is a bug in your stock demo code around line 140, after ShowDropDownButton="True" in AutoComplete.xaml.



<syncfusion:SfTextBoxExt
                Grid.Column="2"
                x:Name="UZOVISelection"
                AutoCompleteMode="SuggestAppend"
                SuggestionMode="Contains"
                SelectedItem="{Binding SelectedUzoviItem, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                AutoCompleteSource="{Binding UZOVIPartyItems, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
                SearchItemPath="DisplayName"
                ShowDropDownButton="True"
                ShowClearButton="True">
                <syncfusion:SfTextBoxExt.AutoCompleteItemTemplate>
                    <DataTemplate>
                        <TextBlock
                            Margin="4,2,4,0"
                            Text="{Binding DisplayName}" />
                    </DataTemplate>
                </syncfusion:SfTextBoxExt.AutoCompleteItemTemplate>
                <syncfusion:SfTextBoxExt.NoResultsFoundTemplate>
                    <DataTemplate>
                        <Label
                                HorizontalAlignment="Center"
                                VerticalAlignment="Center"
                                Content="No Results Found" />
                    </DataTemplate>
                </syncfusion:SfTextBoxExt.NoResultsFoundTemplate>
            </syncfusion:SfTextBoxExt>


VS Vijayarasan Sivanandham Syncfusion Team April 13, 2021 05:40 PM UTC

Hi NM van Strien, 
Thank you for contacting Syncfusion Support. 
Based on provided information we have created the sample and try to replicate your reported issue and unable to replicate the issue from our end in simple sample. it is working fine as expected. Please find the tested sample and video demo from our end in the below link,

Sample Link: https://www.syncfusion.com/downloads/support/forum/164465/ze/Sample1791855595
 
Can you please share us below things?       
        1. Provide the video illustration of the reported issue
        2. In your last update mentioned as achieve my goal by using SfTextBoxExt. Can you please confirm now you are using SfMultiColumnDropDownControl or SfTextBoxExt.
 
if you still facing the same issue? If yes, please modify the sample based on your scenario. 

It will be helpful for us to check on it and provide you the solution at the earliest.

Regards,
Vijayarasan S  
 



NV NM van Strien April 17, 2021 06:56 AM UTC

Dear Vijayarasan,

In response to your reply, I created 2 test projects in which I am unable to reproduce the issue myself.
- a stock WPF .NET5 project
- a more complex WPF .NET5 project in which I am using caliburn micro. This is a project I sometimes use to test out a new syncfusion control.

In both projects the SfMultiColumnDropDownControl allows for filtering of the itemssource.

In case you are interested, I will be happy to share these projects with you.

Kind regards,

Niels van Strien


VS Vijayarasan Sivanandham Syncfusion Team April 19, 2021 04:17 PM UTC

Hi NM van Strien,

Thanks for the update.

Based on provided information you can share the sample in this forum, or you can create the incident under your direct trac account for SfMultiColumnDropControl control and share the sample in that incident and also Can you please share us below things?         
        1. Provide more details about your scenario with illustrations? 
        2. Can you please share your exact requirement?

We will check the possibilities to achieve your requirement using any workarounds and update with further details.

Regards,
Vijayarasan S
 


Loader.
Up arrow icon