c# - Autocomplete AND preventing new input - combobox -


How can I type the users of my program into a price and complete it automatically, however, I also prevent them from entering new data because this would be the reason for the data being obsolete (unless you have direct access to the database).

Does anyone know this?

The reason is not to use only one dropdown style combobox, the reasoning is that it is entering data by typing and then denying the characters which are not part of any of the options in the list because it Easy on user

If you have used QuickBook Timer, this is the style of kickboxes I'm going.

BFree is a success, but this is the solution I was looking for. The combo box is using a dataset as a source, so it is not a custom source.

  Protected Virtual Zero comboBoxAutoComplete_KeyPress (Object Sender, KeyPressEventArgs E) {if (Char.IsControl (e.KeyChar)) // let it go if it has control panel like jailbreak, tab, backspace , Enter ... return; } Combo box box = ((combo box) sender); // should get only the selected part. Otherwise, Adds the auto-alert value to the kekor (i.e. we do not get anywhere) to the string. String non-selected = box Lesson Shuttle (0, box .text - box selection) Length; String text = non-selected + e. Keker; Bull Match = False; (Int i = 0; i & lt; box.Items.Count; i ++) {if (((DataRowView) box.Items [i]) [box. Displaymember] .restring (.) Start (text, True, zero)) {matching = true; break; }} // Toggle matching boole because if we set the handle to true, then it values ​​the input, and we do not want to stop // input if it matches. E.Handled =! Matched; }  

Comments