Solved

.NET DataGridView Combobox not keeping autocomplete value

Posted on 2014-09-22
4
457 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 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

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

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

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

705 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