I have a customer filter that should be searching the description field as well but I think its not cause the text search path is set to reference how to do i get it so that it honours my path
/// Class CustomAutoCompleteViewFilter.
/// Implements the <see cref="Telerik.XamarinForms.Input.AutoComplete.IAutoCompleteFilter" />
/// </summary>
/// <seealso cref="Telerik.XamarinForms.Input.AutoComplete.IAutoCompleteFilter" />
public
class
CustomAutoCompleteViewFilter : IAutoCompleteFilter
{
/// <summary>
/// Filters the specified item.
/// </summary>
/// <param name="item">The item.</param>
/// <param name="searchText">The search text.</param>
/// <param name="completionMode">The completion mode.</param>
/// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
public
bool
Filter(
object
item,
string
searchText, CompletionMode completionMode)
{
StockAutoCompleteInfo stock = (StockAutoCompleteInfo)item;
string
lowerReference = stock.Code.ToLower();
string
lowerDescription = stock.Description.ToLower();
string
lowerSearchText = searchText.ToLower();
return
lowerReference.Contains(lowerSearchText) || lowerDescription.Contains(lowerSearchText);
}
}
}
<telerikInput:RadAutoCompleteView x:Name=
"txtCode"
SuggestionViewHeight=
"300"
CompletionMode=
"StartsWith"
TextSearchPath=
"Reference"
Watermark=
"Search for Bom here..."
>
<telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
<DataTemplate>
<ViewCell>
<StackLayout Orientation=
"Vertical"
>
<Label Text=
"{Binding Reference}"
/>
<Label Text=
"{Binding Description}"
/>
<BoxView BackgroundColor=
"Black"
HeightRequest=
"1"
HorizontalOptions=
"StartAndExpand"
/>
</StackLayout>
</ViewCell>
</DataTemplate>
</telerikInput:RadAutoCompleteView.SuggestionItemTemplate>
</telerikInput:RadAutoCompleteView>
<telerikInput:RadButton x:Name=
"btnFindBom"
BackgroundColor=
"#343C41"
TextColor=
"White"
Clicked=
"BtnGetBomInfo_Clicked"
Text=
"Find Bom"
></telerikInput:RadButton>