Solved

.NET DataGridView Combobox not keeping autocomplete value

Posted on 2014-09-22
4
444 Views
Last Modified: 2014-10-27
I have an application that contains a datagridview with several combobox columns.  

There is no issue when the user clicks on the desired entry value, however the autocomplete does work correctly with highlighting the correct entry (i.e. type 'Y' lists 'Yes), when leaving the cell the highlighted value disappears.
0
Comment
Question by:Cmitch
4 Comments
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 40336411
Your explanation is unclear. It will disappear if you don't select the value you desired.
0
 

Author Comment

by:Cmitch
ID: 40336447
Sorry, it will disappear if you only type in the entry.

Whereas if I was to click on a entry this keeps the selected value every time.
0
 
LVL 34

Accepted Solution

by:
sarabande earned 500 total points
ID: 40342087
it is still unclear. please tell each single action you take and explain what is different to the normal behavior of an editable combobox.

note, there are different implementations of an editable combobox which allows to enter new entries in the edit field of the combobox. if the dropdown list opens when you begin typing the autocomplete was not shown in the edit field but only the first match of the string typed so far was displayed in the dropdown list. to overtake the suggestion you would use the arrow keys or the mouse. other implementations would not show the dropdown box while typing but would show the autocomplete suggestion highlighted right to the text cursor.

if you don't want to be able to type new values you should use a non-editable combobox rather than a dropdown edit.
 
Sara
0
 

Expert Comment

by:Sha
ID: 40358516
Hi Cmitch,
I understand, when you type Y it shows YES but when you leave the cell the values disappears. Same time when you click, YES appears but it do not disappear when leave cells.

if this is right, Pls check the selectedIndex value of the combo box while leaving cells. May be you will have to set it based on the displayed text ( if selectedIndex  < 0)

Sha
0

Featured Post

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

730 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