473,320 Members | 2,193 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,320 software developers and data experts.

DataGridView (Stop it From Drawing)

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 takes about 3 seconds during which time I
can see the bottom scroll bar shinking more and more till its done.

I've tried putting "DataGrideView.SuspendLayout();"
"DataGridView.ResumeLayout();" around the "AutoSeizcolumnsMode =
Fill;" but I still see the bottom scroll bar shrinking little by
little. I can do "Hide() / Show()" to hide the shirnking scrollbar
but it still takes 3 seconds to complete.

I think the DataGridView is drawing to display after each column
resize, when I only want it to set the widths and draw at the end. Is
there a way to do this? Is "SuspendLayout()" suppose to do this?

Thanks

NB
Dec 31 '07 #1
0 2424

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

Similar topics

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...
2
by: Marc Solé | last post by:
Hello, I want to insert an image to a specific column of a dataGridWiew. I explain what I'm doing: - I define the ColumnType as a DataGridViewImageColumn. - I select the image (an icon of...
6
by: martin1 | last post by:
Hi, all, Is there any way to change DataGridView row color based on different row data? for example, if row data in first column = 1, it is yellow, if it is 2, it is blue, if 3 it is white. That...
4
by: Martin Arvidsson | last post by:
Hi! I have used the SqlCommand and DataReader to read data to a DataSet This dataset is the used to set the properties; DataMember and DataSource of the DataGridView. Now what i want to do is...
1
by: Diogo Alves - Software Developer | last post by:
Greetings, I've been trying to put an image on the background of a datagrid, I used the overriten property BackgroundImage, but it was useless (maybe I'm missing something). Could someone...
0
by: Scotty | last post by:
Hi, Hope someone can help me I have a datagridview sith data Code below works fine if I print the data if there is only 1 page (without using '!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! If...
2
by: Scotty | last post by:
Hi, Hope someone can help me I have a datagridview I want to print Code below works fine if I print the data if there is only 1 page (without using hasmore pages...
3
by: =?Utf-8?B?UGV0ZXI=?= | last post by:
I'm trying to add a datagridview control to a Windows Form to display read-only information in visual basic 2005. My understanding is that datareader will be faster for this purpose. I have the...
2
by: mrstrong | last post by:
Gday, Why would all my checkboxes inside a datagridview stop working (ie checked state not updating when user clicks) when the datagridview's editmode property is changed to "EditOnEnter"? It...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.