dropdownlist advice

R

Richard Roche

What the best way to make an aspnet DDL act like a window 'combo' box where user can 'auto complete' by just typing enuf to uniquely identify the entry they want. Of course currently the control move only to the first character.

Thanks.
 
S

Scott M.

Best way is not to do it. It would involve a trip to the server on each
keystroke!

Richard Roche said:
What the best way to make an aspnet DDL act like a window 'combo' box
where user can 'auto complete' by just typing enuf to uniquely identify the
entry they want. Of course currently the control move only to the first
character.
 
S

Scott M.

Yes, client-side solutions. But not ASP.NET Web Control solutions.

Client side, you'd need a textbox on top of a dropdown. The list of values
in the dropdown would need to be in an array. In the onKeyPress event
hanlder, you would check the value(s) of the textbox and then scan through
the array looking for alphabetical matches (letter by letter). If you were
to find one, you would then have to change the selectedItemIndex of the
dropdown.
 

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,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top