AutoComplete programmatically select an item

Hi, I set a Textbox that link to the autocomplete control populated with a bindingsource,

I want to add an new item that typed in the textbox to the dataset and I do that with BeforeAddItem Event

my question is how can I select the added item or pass it to AutoCompleteItemSelected Event ?


1 Reply

FS Fathima Shalini P Syncfusion Team April 30, 2008 12:54 PM UTC

Hi Reza,

Thank you for your interest in Syncfusion Products.

Please find the following code snippets that selects the newly added item from the Autocomplete control.


void autoComplete1_AutoCompleteItemSelected(object sender,
Syncfusion.Windows.Forms.Tools.AutoCompleteItemEventArgs args)
{
Console.WriteLine(args.SelectedValue);
Console.WriteLine(this.textBox1.Text);
}


Please find a simple sample in the following link:

http://websamples.syncfusion.com/samples/Tools.Windows/F73221/main.htm

If I have misunderstood your requirement, could you please explain me in detail so that I could work out in depth and provide you a better solution?

Please let me know if any concerns.

Regards,
Fathima





Loader.
Up arrow icon