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.
Syncfusion Feedback

Setting Datasource property of AutoComplete control does not show the drop down

Thread ID:

Created:

Updated:

Platform:

Replies:

75618 Aug 1,2008 09:36 AM Aug 7,2008 06:16 AM Windows Forms 5
loading
Tags: Tools
Faltu
Asked On August 1, 2008 09:36 AM

Hi,
I am using AutoComplete component. Please see the below code snippet:

List dests = new List( new string[] { "Dest1", "Dest2", "Dest4", "Dest3", "Dest5"});
autoCompleteDest.SetAutoComplete(textbox1, AutoCompleteModes.Both);
autoCompleteDest.Datasource = dests;

No when I type something (starting with 'D') in the textbox1, the drop down does not appear. I tried setting AutoCompleteColumnInfo() but of no use. Kinldy let me know how to use this control with a list of strings and objects. Thanks

I am using Syncfusion version 6.302.0.30.

Regards
Kiran



Faltu
Replied On August 4, 2008 01:16 PM

Hi,

The scenario is like this - Textbox is part of a UserControl (say UC1). If this UC1 is child of Form, then it works fine. If this UC1 is child of another UserControl (say UC2) and this UC2 is the child of Form, then AutoComplete does not work.

Kindly let me know how to resolve this. Thanks.

Regards
Kiran


Faltu
Replied On August 4, 2008 02:08 PM

The autocomplete component is part of UC2 and not part of Form. This is the situation it is not working.

So When the autoComplete is part of usercontrol rather than the form then it does not work.

Let me know the solution for this. Thanks.

Regards
Kiran



Administrator [Syncfusion]
Replied On August 6, 2008 02:46 AM

Hi Kiran,

Thank you for your interest in Syncfusion Products.

When AutoComplete control is used in a UserControl, the parent form of the UserControl has to be set to the ParentForm property of the AutoComplete control as shown below:

private void UserControl1_Load(object sender, System.EventArgs e)
{
this.autoComplete1.ParentForm = this.ParentForm;
}

If you do not implement the above given code snippet,then AutoComplete will not read the Datasource that is set in UserControl .

Please refer the following sample as per your requirement.
http://websamples.syncfusion.com/samples/Tools.Windows/F75618/main.htm


Please refer to this KB article and tutorial link for more clarifications.
KBArticle

http://www2.syncfusion.com/ug_63/toolswin/EmbeddingAnAutoCompleteControlInAUserControl.html

Please let me know if you need more assistance.

Thanks for your patience.

Regards,
Hema


Faltu
Replied On August 6, 2008 01:19 PM

Thanks
Kiran


Administrator [Syncfusion]
Replied On August 7, 2008 06:16 AM

Hi Kiran,

Thank you for the update.

Regards,
Hema


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.

Warning Icon 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.Close Icon

;