3
Answers

Combo box help!!

mad nick

mad nick

16y
4.9k
1
Hello,

I have a problem and I do not know how to fix it maybe you can give me a hand ....

then I try to be clear:

I have a combo box which is connected to a database. Entering the first few letters of a word I could make a filter (because the data are many) and then as for the t9 phone, typing "a" I filter all the records in the database and I found only the records that begin with " a ". So far everything is okay.

The problem is that in order to display all the records filtered by force must click on the arrow of the combo box.

What we want it to automatically where you enter the letter or letters in order to filter the databaase the combo box should open by itself so as to show me all results.

You can do this?

Thanks for possible help
Answers (3)
0
mad nick
NA 3 0 16y
Thanks to all!!
0
Jan Montano
NA 2.6k 0 16y
Hi Nick,

Welcome to the C-sharpcorner forum.

You could do that by modifying the AutoCompleteMode and AutoCompleteSource property of your combobox

try:
AutoCompleteMode = Suggest
AutoCompleteSource = ListItems

Try playing around and modifying those values until you come up with what you want.

*the DropDownStyle must either be set to DropDown or Simple
0
Len La Sala
NA 126 0 16y
Hi Nick,
I don't think you can automatically drop a combo box. but what you can do is have a text box for your query and a list box for your results, the list box only appearing if results are obtained from the db. you could also make a custom control with the a text box, list box and button (for the drop down arrow) so it can be used on any form of your application. I would be happy to help if needed.

www.c-sharplizards.com