title: Combobox = textbox + list
body: <p>I want to free type in combobox. When I stop typing I have a delayed task that populates combobox items with some input dependent results. The problem is that my input is overridden by the first item in the list. Is there a way to keep my input?</p>
  
  <p>My sample code is going like this:</p>
  
  <pre><code>public void PopulateCombo(JObject result)
      {
          Debug.WriteLine("Thread id: " + Thread.CurrentThread.ManagedThreadId);
  
          cbSearch.Items.Clear();
          if (result.Value&lt;bool&gt;("success") == true)
          {
              JArray arr = result.Value&lt;JArray&gt;("data");
              for (int i = 0; i &lt; arr.Count; i++)
              {
                  JToken item = arr[i];
                  cbSearch.Items.Add(new ComboBoxItem( item.Value&lt;string&gt;("name"), item.Value&lt;string&gt;("_id")));
              }
              cbSearch.DroppedDown = true;
          }
      }
  </code></pre>
  
  <p><strong>Edited on 23.06</strong></p>
  
  <p>I'm giving an example of what I'm really trying to do.</p>
  
  <ol>
  <li>Combobox is empty (no items)</li>
  <li>User starts typing for example "ja". Combobox sends query to my backend. Should n't be a problem as the call is asynchronous with 1 second delay after user last input.</li>
  <li>My backend returns some results (Anton Jamison, James Aaron, James Hetfield, etc., limited to 50)</li>
  <li>I want to populate the dropdown list with results, to open it, but as a combobox text i want to keep "ja", so the user can clarify his search further.</li>
  <li>User extends his search "ja h". Backend responds with James Hetfield. Result now is only one item and I can set the combobox text now or keep the behavior from above. Not sure which would be better yet.</li>
  </ol>
  
  <p>All this is implemented but at step 4 when I populate the combobox using the function above, the text of the combo is changed from "ja" to the first match of the list. (Anton Jamison in the example). I'm almost sure that there was a simple option for implementing this behavior but I'm not sure if it was in C#.</p>
  
  <p>On comments :</p>
  
  <ol>
  <li>It was a good try but unsuccessful. Once I populate the combobox items my search string is changed to the first match of the list.</li>
  <li>I think I don't try to implement the autocomplete feature.</li>
  <li>Good catch about the DroppedDown. I move it in the edited version.</li>
  </ol>