473,624 Members | 2,305 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGridView Performance issue

FX
Hi all,
I'm using a CLR 2 component DataGridView and I'm encountered Performance
issue.
Here is the snippet :
string valueStr = value.ToString( );
DataGridViewRow Collection rows = dataGridView1.R ows;
foreach (DataGridViewRo w dataGridViewRow in rows) {
dataGridViewRow .Cells[0].Value = valueStr;
}

The type of first column is DataGridViewChe ckBoxCell.
I takes more than 15 sec to execute this part of code (my component only
have 200 rows).

Does anyone has an idea to improve this ?

Thanks in advance
Fx
Jan 18 '06 #1
1 1966
First - have you tested the performance outside of the debugger? (pref. in
release mode) Things can often be deceptive.

Second - it's not clear what your data is; if this is a custom class you
could look into the performance of the property setter? Or even (if a
bespoke class that provides property notifications) update the objects'
properties directly (perhaps suspending either UI updates or binding while
you do it).

Third - I'm not sure if it will help (I might misunderstand these
functions), but you could try preventing UI updates?

datagridview1.S uspendLayout(); // disable layout
try {
// your code
}
finally {
datagridview1.R esumeLayout(tru e); // enable and process pending
}

Fourth - weep

Marc
Jan 18 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
8372
by: WayDownUnder | last post by:
I have a datagridview that is bound to a cutom collection. The classes contained in the custom collection have the properties that are bound to the class . This works fine ! But if one of the properites exposes another object I would like to bind a property of the sub object to the DataPropertyName this does not seem to work. eg main object customer has a property called Address which is a contained object inside object Address there...
7
9685
by: steve | last post by:
Hi All I urgently need help on setting datagridview cell borders at runtime I found some code on the web from Programming Smart Client Data Applications with .NET 2.0 by Brian Noyes See below This is what I have been trying to achieve, but when I run it ALL the cell
2
8713
by: Rick Shaw | last post by:
Hi, I have a problem with the datagridview not refreshed when the application first appear on the screen. The datagridview display data from a table in the dataset. At the same time, I've added checkbox columns that are not bounded the table. This datagridview is located in the tab (2nd). I thought I mention that since that might be part of the problem (?). When the applications start, it will need some parameter criteria selection...
1
7777
by: Karl | last post by:
Hi all... This is a good one. You'll like this... I am working on a course management tool that allows certain Courses to be cross referenced with Job Roles and, when they are, whether the course is a priority course or not. Simple. Because there is alot of data stored for each course, I am using a tab control with several pages. The Job Role cross-referencing comes on
2
2905
by: M R | last post by:
I need to build and display a huge data grid (roughly 5000x5000). (I know it is difficult to view, but i need to do it anyway) the immediate problem i am facing is that it takes a VERY long time to add 5000 columns. i created an array of DataGridViewTextBoxColumn and called DataGridView Columns.AddRange(array). This still takes a VERY long time. i haven't even attempted to add the 5000 rows or calculate the values of each cell (25M of...
0
2058
by: Andrus | last post by:
I tried to use modeless picklist for DataGridView custom ComboBoxColumn without success. Steps to reproduce issue: 1. Run code 2. Enter some character 3. Press Tab Observed:
18
6041
by: Andrus | last post by:
Marc, Thank you very much. I have issue on implementing add row properly using this. User presses down arrow in last row in grid starting adding new row. Then user changes its mind desiding that new row should not added and presses up arrow. DataGridView does not show this unfinished row anymore.
7
1806
by: Bill Schanks | last post by:
VB.NET 2005 SQL Server 2000 I have a datagridview that users will update. When there are only a few records the update is fine. However when they update 100-200 of the rows the udpate can take 2+ Mins. Is this normal performance, as the datagridview was not meant to update this many records at once?
6
2843
by: Miro | last post by:
Sorry for the cross post. I am stuck. I have a datagridview for poker rounds. Basically there are 3 columns in this datagridview. "Round" "SmallBlind" "BigBlind" I have an issue when I tab through the new row being added. It does not 'Add' that row, nor setup the 'next blank add row' so I can continue to tab
0
8238
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8680
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8336
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8478
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6111
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4082
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1786
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1485
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.