?
Solved

Combobox Match Behaviour when DropDownStyle = DropDownList

Posted on 2016-08-23
6
Medium Priority
?
52 Views
Last Modified: 2016-09-03
I have an Combobox with DropDownStyle = DropDownList. This DropDownStyle should not be changed!
When the user types a Letter, the DropDownList moves to the first entry starting with this letter. Is it possible to overwrite this behaviour? For example the DropDownList should move to the first entry containing the letter, typed by the user?
0
Comment
Question by:jdkern
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41766499
You can not achieve this without customization. You need to write custom code and extend the behaviour of the Combobox.
Please refer the following article:
http://www.codeproject.com/Tips/755707/ComboBox-with-Suggestions-Based-on-Loose-Character
0
 

Author Comment

by:jdkern
ID: 41766554
Sorry, the proposed example from codeproject does not work with DropDownStyle = DropDownList!
Clearly, I have to write custom code to change the behaviour. But which method should I best overwrite? KeyPress? Or is there a better way?
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41766591
You can use the onSelectionChanged event
0
Create CentOS 7 Newton Packstack Running Keystone

A bug was filed against RDO for the installation of Keystone v3. This guide is designed to walk you through the configuration for using Keystone v3 with Packstack. You will accomplish this using various repos and the Answers file.

 

Accepted Solution

by:
jdkern earned 0 total points
ID: 41775849
Thank you, Ramkisan Jagtap!

I solved my Problem.

Roughly speaking I catch the pressed Letters in KeyPress and store them in a string "userInput".
In OnSelectedIndexChanged I search the best match for "userInput" with the help of the FindString method and set SelectedIndex to the corresponding value.
0
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41775892
Good to know that you found the solution.

 Cheers
0
 

Author Closing Comment

by:jdkern
ID: 41782781
?
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question