Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / February 2007

Tip: Looking for answers? Try searching our database.

DataGridView Bound ComboBoxColumn cell take several seconds to show edit control

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
vextant@gmail.com - 20 Feb 2007 19:39 GMT
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!
Oliver Sturm - 21 Feb 2007 10:37 GMT
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
Signature

http://www.sturmnet.org/blog

vextant@gmail.com - 21 Feb 2007 23:05 GMT
Oliver, thanks for the reply. See my comments below.

> Hello vextant,
>
[quoted text clipped - 3 lines]
>
> That doesn't sound very surprising to me.

Well, it's a product list for a company, small in my opinion.

> >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
[quoted text clipped - 6 lines]
> 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.

>                 Oliver Sturm
> --http://www.sturmnet.org/blog

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!
Curt Gough - 23 Feb 2007 15:49 GMT
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. ;-)

Signature

Curt Gough
123cgough@kcumb.edu

Remove 123 from above address to mail directly

> Oliver, thanks for the reply. See my comments below.
>
[quoted text clipped - 36 lines]
>
> Thanks again!
vextant@gmail.com - 23 Feb 2007 19:55 GMT
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!

> This may not be an anwer you are looking for. But have you tried changing
> the EditMode property of the DataGridView? The default is
[quoted text clipped - 52 lines]
>
> > Thanks again!

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.