473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

DataGridView SuspendLayout BeginInit

Gwl
I have a DataGridView and following code:

private void button1_Click(object sender, EventArgs e)
{
dataGridView1.ColumnCount = 365;
}

When I click on the button it is extremely slow (some seconds) to
create the table. I tried to change code to:

private void button1_Click(object sender, EventArgs e)
{
dataGridView1.SuspendLayout();
dataGridView1.ColumnCount = 365;
dataGridView1.ResumeLayout(false);
}

but nothing change. Also tried using

((System.ComponentModel.ISupportInitialize)
(this.dataGridView1)).BeginInit();

without success. What should I do?
Thank you, g.

Feb 15 '07 #1
0 3987

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

Similar topics

0
by: Brent McIntyre | last post by:
Good evening all, I am having a little (HUGE ACTUALLY) problem using the SuspendLayout & ResumeLayout functions from a module. DELEGATE PROBLEM This is the code from the Module_Data:...
1
by: 2G | last post by:
Hi, I've a usercontrol that fills a listview with data from my db, I had this.SuspendLayout() in the beginning and this.ResumeLayout at the end of the function that loads the data and all worked...
6
by: Brent McIntyre | last post by:
Good afternoon all, I am having a little problem using the SuspendLayout & ResumeLayout functions from a module. This is the Delegate Declaration in the module: Public Delegate Sub...
1
by: FX | last post by:
Hi all, I'm using a CLR 2 component DataGridView and I'm encountered Performance issue. Here is the snippet : string valueStr = value.ToString(); DataGridViewRowCollection rows =...
0
by: Mark Carew | last post by:
Hi, I'm writing a winform app (as practice) that has as one of its features a button that reads an xml file to a datagridview. No matter what I do I get two columns instead of one. The...
9
by: John Brown | last post by:
Hi there, Has anyone had any serious performance problems with this class. A couple of hundred rows of data with 4 columns (everything loaded on-the-fly with no DB involved, all simple strings,...
2
by: hjin | last post by:
DataGridView takes very much time if I update a lot of data I have a DataGridView which has a DataSource (a DataTable) of 3000 rows. If I want to update one column of every rows in the DataTable,...
0
by: NvrBst | last post by:
By default I have it set to "DataGridView.AutoResizeColumns(DisplayedCells);" I let the user change to "DataGridView.AutoSizecolumnsMode = Fill;" at runtime with a button. When I do that it...
3
by: Andrus | last post by:
I have DataGridView in virtual mode containing 3500 rows. In code below, assigning to RowCount value to 3500 takes 8 seconds. CPU usage goes high at this time. Stepping by F11 into user code shows...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.