PC Review


Reply
Thread Tools Rate Thread

DataGridView SuspendLayout BeginInit

 
 
Gwl
Guest
Posts: n/a
 
      15th Feb 2007
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.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ISupportInitialize BeginInit/EndInit Jack Jackson Microsoft Dot NET Framework Forms 0 10th Aug 2007 10:59 PM
Problem with ColumnChanging in the BeginInit() Microsoft News Group Microsoft ASP .NET 0 21st Sep 2006 01:22 AM
Dataset.BeginInit =?Utf-8?B?UmF2aQ==?= Microsoft Dot NET 1 30th Nov 2005 06:56 AM
Component dependencies, BeginInit() and Endinit() Edward Diener Microsoft Dot NET Framework 0 6th Mar 2004 11:03 AM
override DataGrid.BeginInit () Kristin Microsoft Dot NET Framework Forms 0 1st Aug 2003 04:23 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 02:49 AM.