Hi
I have a requirement from my users to be able to type into an autocompletebox and have it suggest results based on multiple values from my business object.
As an example, if the business object looks like this:
I want to be able to tell RadAutoCompleteBox to not only search on the Name field, but also the AccountCode when the user types into the box. The item data template I am showing the user is a stack panel containing both fields, so then they can start typing a value from either field to populate the suggestion box.
If I could provide the control with a search function to use instead of TextSearchPath, that would be ideal. A lamba like this would do the trick:
Is there any way to override the default search behavior of the RadAutoCompleteBox?
I have a requirement from my users to be able to type into an autocompletebox and have it suggest results based on multiple values from my business object.
As an example, if the business object looks like this:
public
class
Client
{
public
string
Name {
get
;
set
;}
public
string
AccountCode {
get
;
set
;}
public
string
Address {
get
;
set
;}
}
I want to be able to tell RadAutoCompleteBox to not only search on the Name field, but also the AccountCode when the user types into the box. The item data template I am showing the user is a stack panel containing both fields, so then they can start typing a value from either field to populate the suggestion box.
If I could provide the control with a search function to use instead of TextSearchPath, that would be ideal. A lamba like this would do the trick:
radacbox.SearchFunction += (client, search_text) => { client.Name.Contains(search_text) || client.AccountCode.Contains(search_text) };
Is there any way to override the default search behavior of the RadAutoCompleteBox?