AutoCompleteStringCollection problem

J

jack

This code dosent display
data.Add("Csharp");
data.Add("C sharp");

couldnt find the reason why ..



AutoCompleteStringCollection data = new
AutoCompleteStringCollection();
data.Add("Csharp");
data.Add("CSharp");
data.Add("C#");
data.Add("C #");
data.Add("C sharp");
data.Add("C Sharp");
comboBox1.AutoCompleteSource =
AutoCompleteSource.CustomSource;
comboBox1.AutoCompleteMode =
AutoCompleteMode.SuggestAppend;
comboBox1.AutoCompleteCustomSource = data;



Please help

Thanks for helping me
 
K

Karl Seguin [MVP]

AutoCompleteStringCollection work in Windows Form. If your combox box is a
System.Windows.Forms.ComboBox, then it won't display in an asp.net form.
Rather you need to use a System.Web.UI.WebControls.DropDownList which
doesn't support this kind of feature.

If this _is_ a winform question, then ur in the wrong newsgroup.

If you want this type of functionality, you'll need to turn to a 3rd party
control that either uses a javascript array or Ajax such as
http://weblogs.asp.net/mschwarz/archive/2005/11/11/430267.aspx


Karl
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top