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.

autocomplete.matchitem - sample code?

Thread ID:

Created:

Updated:

Platform:

Replies:

94780 Jun 1,2010 01:14 PM Jun 3,2010 07:00 AM ASP.NET Web Forms (Classic) 1
loading
Tags: Tools
James Kim
Asked On June 1, 2010 01:14 PM

I'd like to know if it is possible to customize the list of possible matches presented by the autocomplete control using the matchitem event. However there is no sample source available, and the help file does not elaborate what the event parameters mean. Can anyone help me dig deeper into this?

Lingaraj S [Syncfusion]
Replied On June 3, 2010 07:00 AM

Hi James,

Thank you for your interest in Syncfusion products.

Please try using MatchMode as MatchMode.Manual to customize the possible matches in AutoComplete as shown below.

private void Form1_Load(object sender, EventArgs e)
{
... // Other codes
this.autoComplete1.SetAutoComplete(this.textBox1, Syncfusion.Windows.Forms.Tools.AutoCompleteModes.AutoSuggest);
this.autoComplete1.DataSource = dt;
this.autoComplete1.MatchItem += new Syncfusion.Windows.Forms.Tools.AutoCompleteMatchItemEventHandler(autoComplete1_MatchItem);
this.autoComplete1.MatchMode = Syncfusion.Windows.Forms.Tools.AutoCompleteMatchModes.Manual;
}
void autoComplete1_MatchItem(object sender, Syncfusion.Windows.Forms.Tools.AutoCompleteMatchItemEventArgs args)
{
if (args.PossibleMatch.StartsWith("TA"))
{
args.Cancel = true;
}
}


Refer the sample from below link.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=WindowsFormsApplication5196913998.zip

Please let me know if you have any queries.

Regards,
Lingaraj S.

CONFIRMATION

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.

;