Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
40
Implement contains search feature in xamComboEditor
posted

Hi,

If I use  AutoComplete= true it only gives me option to search with the starting character entered in the drop down and auto populate the list with selection.So if I type in "Bank" I should get "Apple Bank for Savings" as well as "Bank of America" But I am unable to implement contains search like google search engine in XamComboEditor. Please provide some information how to achieve contains search in xamComboEditor dropdown list.

Parents
  • 34430
    Suggested Answer
    Offline posted

    Hello Partha,

    The AutoComplete functionality of the shared XamComboEditor follows the filtering types of the control. This control has a default filtering type of "StartsWith," which is why you are seeing the behavior you are seeing. These filtering options are configurable, though, and you can read about configuring the XamComboEditor ItemFilters in our online documentation, here: https://www.infragistics.com/help/wpf/xamcomboeditor-custom-filtering.

    As an extra code-example, you can achieve the actual "Contains" filter by using the following XAML:

    <ig:XamComboEditor x:Name="xce" Height="30" Width="300" ItemsSource="{Binding Data}" DisplayMemberPath="Bank"
                       AutoComplete="True">
       <ig:XamComboEditor.ItemFilters>
           <ig:ComboItemFilter FieldName="Bank">
               <ig:ComboItemFilter.Conditions>
                   <ig:ComparisonCondition Operator="Contains"/>
               </ig:ComboItemFilter.Conditions>
           </ig:ComboItemFilter>
       </ig:XamComboEditor.ItemFilters>
    </ig:XamComboEditor>

    I hope this helps you. Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer

Reply Children
No Data