Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8750713
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T12:54:54+00:00 2026-06-13T12:54:54+00:00

My form has a textBox and i want to add autocomplete while typing. My

  • 0

My form has a textBox and i want to add autocomplete while typing.
My autocomplete values are loaded dynamically via a json api.

I applied the “update” function on the “TextChanged” Event of the textBox.

Everytime it is triggered, the autocomplete opens for 0.5 sec and the textBox’s value changes to the first autocomplete entry. After that the autocomplete menu disappears.

I cannot choose any suggestions manuelly…

How to fix?

onload Event:

AutoCompleteStringCollection colValues = new AutoCompleteStringCollection();
private void StellenUebersicht_Load(object sender, EventArgs e)
{
        TextBox textBoxExample = textBox1;
        textBoxExample.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
        textBoxExample.AutoCompleteSource = AutoCompleteSource.CustomSource;
        textBoxExample.AutoCompleteCustomSource = colValues;
        doAutoCompleteListExample();
}

doAutoCompleteListExample():

private void doAutoCompleteListExample()
    {
        if (textBox1.Text.Length >= 1)
        {
            string w = Web.get("MY JSON API URL");

            JObject o = JObject.Parse(w);
            List<string> ac = new List<string>();
            foreach (JObject item in o["items"])
            {
                string name = item["name"].ToString();
                ac.Add(name);
            }
            colValues.AddRange(ac.ToArray());
        }


    }
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T12:54:55+00:00Added an answer on June 13, 2026 at 12:54 pm

    i fixed it.

    Solution:

    change

    textBoxExample.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
    

    to

    textBoxExample.AutoCompleteMode = AutoCompleteMode.Suggest;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The background: My form has a TWebBrowser. I want to close the form with
I am having a problem with the jQuery datepicker. My form has a add
I have 2 Windows Forms. In first, the main window form, has multiline textbox
Hi I have to design a Windows Form which has a simple textbox. The
I'm cleaning up a simple form that has a Start Date textbox and an
I have a C# form that has a text box that needs to constantly
Form has the DoubleBuffered property (bool, inherited from Control). If this is set to
The form has one or more groups of radio buttons on it. It is
My form has issues with latin characters (portuguese). If the user submitted his info
This form has a NotifyIcon object. When the user clicks on the Close button,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.