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.
Unfortunately, activation email could not send to your email. Please try again.

Binding Filter Predicate to ViewModel on SfTextBoxExt

Thread ID:





128247 Jan 10,2017 03:01 PM Jan 11,2017 05:54 AM WPF 1
Tags: SfTextBoxExt
Asked On January 10, 2017 03:01 PM

There is a possibility to Binding my "SuggestionPredicate" located in my View model on the Filter property on SfTextBoxExt control?


 <sync:SfTextBoxExt AutoCompleteSource="{Binding Path=Installers}"
                                                SelectedItem="{Binding Installer, Mode=TwoWay}" 
                                                Filter = "{Binding Path=MyFilter}"/>

On View Model:

public SuggestionPredicate<Installer> InstallerSuggestionFilter
                return new SuggestionPredicate<Installer>(
                (s, i) =>
                    return i.Name.ToLower().Contains(s.ToLower()) && i.BusinessName.ToLower().Contains(s.ToLower());

Thanks you.

Keerthana Jegannathan [Syncfusion]
Replied On January 11, 2017 05:54 AM

Hi CSharpino,   
Thank you for contacting Syncfusion support.   
In SfTextBoxExt, “SuggestionPredicate” cannot be handled in application level but it can be invoked by writing the delegate for this. Therefore, we have prepared a sample with SfTextBoxExt in which we have assigned “SuggestionMode” property as “Custom” and written delegate named “Filter” to handle the filtering of SfTextBoxExt. Please refer the below sample and KB link for further details about Filtering concepts of SfTextBoxExt.   
Sample: TextBoxFilter   
Keerthana J   


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.