By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,750 Members | 1,471 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,750 IT Pros & Developers. It's quick & easy.

DataGridView (Stop it From Drawing)

P: n/a
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?


Dec 31 '07 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.