473,385 Members | 1,829 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,385 software developers and data experts.

difference between SuspendLayout/ResumeLayout andBeginUpdate/EndUpdate

Hi all,

I've read that if i have to add many item to my listview/treeview/...
I can use SuspendLayout or BeginUpdate and after resume with
ResumeLayout or EndUpdate

But I don't understand when to use one instead the other.
Should I use the both ?

Thanks for your help
Sep 29 '08 #1
1 3183
If you are editing, use BeginUpdate/EndUpdate. Layout prevents a few
anchoring etc glitches when moving controls about / resizing
containers. Of course, you could edge on the side of caution and do
both, but it is BeginUpdate/EndUpdate that you want.

Marc
Sep 29 '08 #2

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...
0
by: Tom | last post by:
OK, here's a wierd one... I have a listbox, which I fill with strings (in my case, file names). I normally load this via a loop, adding each item to the list box in the loop. I put lb.BeginUpdate...
1
by: DraguVaso | last post by:
Hi, I found on the net that it is possible to use the BeginUpdate end EndUpdate-methods with a DataGrid:...
4
by: jamesyreid | last post by:
Hi, I'm really sorry to post this as I know it must have been asked countless times before, but I can't find an answer anywhere. Does anyone have a snippet of JavaScript code I could borrow...
0
by: Gwl | last post by:
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...
12
by: Petronius | last post by:
Hallo, does anyone have an idea how to implement difference lists in Javascript? Thanks allot in advance
1
by: =?Utf-8?B?RXRoYW4gU3RyYXVzcw==?= | last post by:
Hi, I was just about to wrap some code for filling a DataViewGrid in grid.SuspendLayout(); //Grid filling code grid.ResumeLayout(); when I got worried t hat something might go wrong in the...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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,...
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...

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.