DataGridView Bound ComboBoxColumn cell take several seconds to show edit control

V

vextant

I am binding a custom object list (custom collection) to a ComboBox
column inside a DataGridView to use as a typical lookup.

The list of items has up to 10,000 rows (8,000 currently) and when you
enter edit mode on the combobox cell you must wait up to 4 seconds to
see the dropdown of the list of items. I am handling the
EditingControlShowing and the EditingControl KeyDown events to
dropdown the ComBox when the user hits Enter. This wait also happens
if you click on the ComboBox dropdown arrow.

I understand that may be a lot of objects, but 4 seconds is an awfully
long pause for the user. I am looking for some ways to cut this down
to 1-2 seconds at least but still use the custom object binding.

The binding is done on Form load and the only thing I can think of is
that it is reloading the control every time the edit control is shown,
which is why it takes so long.

Does anyone know of a way to debug what is going on at a low level?

As well, if anyone has any options or has had this problem and figured
it out, please reply.

Thanks!
 
O

Oliver Sturm

Hello vextant,
The list of items has up to 10,000 rows (8,000 currently) and when you
enter edit mode on the combobox cell you must wait up to 4 seconds to
see the dropdown of the list of items.

That doesn't sound very surprising to me.
I understand that may be a lot of objects, but 4 seconds is an awfully
long pause for the user. I am looking for some ways to cut this down
to 1-2 seconds at least but still use the custom object binding.

It's easy: reduce the number of entries in the list to about 25 to 50%.

Seriously - what user is going to hunt for a particular entry in a list
that contains a few thousand such entries? Such a UI implementation
doesn't make any sense. Find a way to restrict the number of entries, and
you'll have solved the usability problem together with the technical issue.


Oliver Sturm
 
V

vextant

Oliver, thanks for the reply. See my comments below.

Hello vextant,


That doesn't sound very surprising to me.

Well, it's a product list for a company, small in my opinion.
It's easy: reduce the number of entries in the list to about 25 to 50%.

Seriously - what user is going to hunt for a particular entry in a list
that contains a few thousand such entries? Such a UI implementation
doesn't make any sense. Find a way to restrict the number of entries, and
you'll have solved the usability problem together with the technical issue.


The list is used as a product lookup (autocomplete enabled) for a
application that tracks exceptions to orders. The user really would
not ever scroll through the list, but they might. I am looking at ways
to restrict entries and will probably not use the stock DataGridView
ComboBox editing control to do that.

On a side note, I have had normal combo boxes with thousands of items
and they work fine, it seems it is just the fact of the events that
get fired when hosted in the DataGridView. I have seen other posts
complaining about the multiple clicks to get the control into edit
mode.

Thanks again!
 
C

Curt Gough

This may not be an anwer you are looking for. But have you tried changing
the EditMode property of the DataGridView? The default is
EditOnKeystrokeOrF2. I have found by changing it to EditOnEnter my combo
boxes perform much more quickly, not requiring several clicks to become
active. I'm just a newb. So, if I'm way off please be gentle. ;-)
 
V

vextant

Curt,

Hey no problem about being a newb, I feel like that every other year
it seems, like with this damn DataGridView. ;)

As for your suggestion, already done. I have it set to control the
edit with an event when the user hits Enter.

I am going with a custom virtual combo box and/or a TextBox with
autocomplete. The use cannot scroll through the list now, which might
be a problem for my client, but at least it won't be slow. I hope they
won't miss the dropdown box.

Thanks again for your input!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top