Solved

DataGridViewComboBoxColumn dynamically fill data

Posted on 2011-09-27
4
1,071 Views
Last Modified: 2013-12-17
My problem is that DataGridViewComboBoxColumn becomes very slow when populated with a lot of items (more than 1000). Is it possible to fill DataGridViewComboBoxColumn with data partially? I mean (that was functionality fully working in Access), when you click DataGridViewComboBoxColumn, some items are displayed (lets say, 100 items). When you scroll down to the latest item, others are loaded (another 100) and so on. I don't see any other option to make DataGridViewComboBoxColumn working faster? Problem is, how to implement this? Has anyone meet that problem before?
0
Comment
Question by:AntonioRodrigo
  • 2
4 Comments
 
LVL 22

Accepted Solution

by:
Mrunal earned 250 total points
ID: 36716530
Hi,
Yes definitely you can load combo box options on combo scroll event. But for this you have to bind / add options to combo from client side.
here are some references:

http://code.msdn.microsoft.com/VBASPNETInfiniteLoading-10c3f379
http://ajaxian.com/archives/endless-pageless-keep-scrolling-for-more-content
http://www.codeproject.com/KB/ajax/AjaxScrollingPagination.aspx

But further, I will suggest you auto-complete functionality for your scenario.

You can achieve this through jquery

see:
http://docs.jquery.com/Plugins/autocomplete

and also from ajax toolkit.
see:
http://www.asp.net/ajaxlibrary/AjaxControlToolkitSampleSite/autocomplete/autocomplete.aspx



0
 

Author Comment

by:AntonioRodrigo
ID: 36716618
As I can see, this is valid for ASP.NET. I am using Windows forms - sorry, I've forgot to mention that.
0
 
LVL 15

Assisted Solution

by:x77
x77 earned 250 total points
ID: 36719721
Note that Dgv ComboBox Column fills each time you enter on Edit Mode.

If you asociate this with a Column on a DataTable, then it needs go over DataView and Get Column Values.

When you End Edit this column, DataView is disposed and control cleared.
DataView takes time to build.

You can create a new DataView and use it as datasource to Column.
0
 

Author Comment

by:AntonioRodrigo
ID: 36966590
The solution exists - I've used example from Microsoft web site and change it a little bit. Now, my combo box is a part of DataGridView. But - I must not set autocomplete option. This autocomplete is slowing down whole control.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Flash (http://en.wikipedia.org/wiki/Adobe_Flash) has evolved over the years to where it has become a masterful tool for displaying content screen.  It has excellent layout placement, UI precision as well as rendering capabilities. This, along with t…
In my previous two articles we discussed Binary Serialization (http://www.experts-exchange.com/A_4362.html) and XML Serialization (http://www.experts-exchange.com/A_4425.html). In this article we will try to know more about SOAP (Simple Object Acces…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

911 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

20 Experts available now in Live!

Get 1:1 Help Now