?
Solved

.NET DataGridView Combobox not keeping autocomplete value

Posted on 2014-09-22
4
Medium Priority
?
464 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
[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
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 35

Accepted Solution

by:
sarabande earned 1500 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

762 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