We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

An exception occurred when ComboBoxAdv enabled AutoCompleteMode="Suggest"

I use ComboBoxAdv in the Treeview control template and set AutoCompleteMode="Suggest" to filter. When there are multiple rows of data in the list, entering values in a certain row of ComboBoxAdv to filter will cause the current options of other rows of ComboBoxAdv to be cleared


Attachment: Img__facd16af_69a2d247.zip

1 Reply

BA BagavathiPerumal Apranandham Syncfusion Team March 13, 2023 02:39 PM UTC

Hi Wpfdev1 Kunyi,


Each combo box should have unique item sources. If you want to map to the same ItemsSource, you can create a converter that gives a new CollectionViewSource for each ItemsSource binding. Please refer to the below code snippets for your reference.

Code snippets:

<Window.Resources>
<local:CustomViewConverter x:Key="customViewConverter"/>
</Window.Resources>

ItemsSource="{Binding States, Converter={StaticResource customViewConverter}}"

public class CustomViewConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
return new CollectionViewSource { Source = value }.View;
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
We have attached a sample for your reference. Please let us know if you need any further assistance.

Regards,
Bagavathi Perumal A

Attachment: ComBoBoxAdvAutoComplete_3360af97.zip

Loader.
Live Chat Icon For mobile
Up arrow icon