Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

DataGridViewComboBoxColumn dynamically fill data

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Suggested Solutions

It seems a simple enough task, yet I see repeated questions asking how to do it: how to pass data between two forms. In this article, I will show you the different mechanisms available for you to do just that. This article is directed towards the .N…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

766 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