We help IT Professionals succeed at work.
Get Started

DataGridView combobox display

sgaggerj
sgaggerj asked
on
1,078 Views
Last Modified: 2012-05-05
Hi all,

Here's another DataGridView question:

I have a column in my DataGridView that is defined as DataGridViewComboBoxCells.
The cell is databound to a table in my database and gets its values from a single column in that table.

There are presently ~65 items in that column and it will continue to grow to a max of about 95

My problem is that when the combobox is clicked and the elements are displayed for the user to choose, the entire list of elements are not displayed.
A single column that starts at the very top of the screen, and goes all the way down to the task bar is displayed, showing around 50 items.
There are no scrollbars and moving the mouse towards the bottom of the list does not scroll it down further.

What I would like to do is one of the following:

1) Add scrollbars to the list that is displayed and reduce it's height to something a bit more managable, similar to a dropdown list in excel that shows 10-15 items and has scrollbar on the side to access the rest of the items in the list.

OR

2) Add a filter to the combobox where if the user types 1 or 2 characters (ie 'F' or 'FL') the the list of elements is filtered to show only those starting with 'F' or 'FL'.

OR

3) Add an auto-suggest feature similar to that of a web-browser where if the user types in the part of the code, below the box the filtered list (similar to #2) is displayed (ie in the addressbar of a web browser, if you start to type in an address of a page already visited, it will auto-suggest possible pages that it has in cache.)

Any of these would be acceptable and greatly appreciated if someone can help me out.

TIA!

J

Comment
Watch Question
Commented:
This problem has been solved!
Unlock 3 Answers and 8 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE