Solved

.NET DataGridView Combobox not keeping autocomplete value

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

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now