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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Binding Filter Predicate to ViewModel on SfTextBoxExt

Thread ID:





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

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 10:54 AM UTC

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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon