Solved

DataGridViewComboBoxColumn dynamically fill data

Posted on 2011-09-27
4
1,066 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

758 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

19 Experts available now in Live!

Get 1:1 Help Now