Click here to Skip to main content
15,887,979 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Fabio Franco1-Feb-11 3:17
professionalFabio Franco1-Feb-11 3:17 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy1-Feb-11 3:39
professionalChesnokov Yuriy1-Feb-11 3:39 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Fabio Franco1-Feb-11 3:52
professionalFabio Franco1-Feb-11 3:52 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Euhemerus1-Feb-11 6:52
Euhemerus1-Feb-11 6:52 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Dave Kreskowiak1-Feb-11 12:23
mveDave Kreskowiak1-Feb-11 12:23 
AnswerRe: How to load 100,000 list view items without application freeze? PinPopular
Richard MacCutchan31-Jan-11 4:05
mveRichard MacCutchan31-Jan-11 4:05 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 6:43
professionalChesnokov Yuriy31-Jan-11 6:43 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Luc Pattyn31-Jan-11 4:13
sitebuilderLuc Pattyn31-Jan-11 4:13 
Hi,

here are some ideas for you:

1. having thousands of items in any Control does not make for a good user interface.

2. list oriented Controls will relayout and/or repaint themselves after every addition. it is wise to use AddRange rather than Add, and sometimes surround the entire operation with SuspendLayout/ResumeLayout.

3. if obtaining the items takes a while, it often helps to build a collection of items to be added to a list Control in a generic list, then add the list's content to the Control. The former can be performed on any thread, the latter obviously needs to be executed by the main thread.

4. some Controls have a "virtual mode" where one only needs to provide items when they become visible.

Smile | :)
Luc Pattyn [Forum Guidelines] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, improve readability, and make me actually look at the code.

modified on Monday, January 31, 2011 10:26 AM

AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 6:49
professionalChesnokov Yuriy31-Jan-11 6:49 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Luc Pattyn31-Jan-11 6:57
sitebuilderLuc Pattyn31-Jan-11 6:57 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 7:03
professionalChesnokov Yuriy31-Jan-11 7:03 
QuestionRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 6:53
professionalChesnokov Yuriy31-Jan-11 6:53 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 6:55
professionalChesnokov Yuriy31-Jan-11 6:55 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Paw Jershauge31-Jan-11 9:00
Paw Jershauge31-Jan-11 9:00 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Richard MacCutchan31-Jan-11 9:15
mveRichard MacCutchan31-Jan-11 9:15 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Paw Jershauge31-Jan-11 12:18
Paw Jershauge31-Jan-11 12:18 
QuestionRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy1-Feb-11 1:14
professionalChesnokov Yuriy1-Feb-11 1:14 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Richard MacCutchan1-Feb-11 3:17
mveRichard MacCutchan1-Feb-11 3:17 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 10:00
professionalChesnokov Yuriy31-Jan-11 10:00 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Paw Jershauge31-Jan-11 12:17
Paw Jershauge31-Jan-11 12:17 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy1-Feb-11 1:10
professionalChesnokov Yuriy1-Feb-11 1:10 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Paw Jershauge1-Feb-11 8:32
Paw Jershauge1-Feb-11 8:32 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Paw Jershauge1-Feb-11 8:38
Paw Jershauge1-Feb-11 8:38 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Not Active31-Jan-11 12:18
mentorNot Active31-Jan-11 12:18 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Member 16746131-Jan-11 23:47
Member 16746131-Jan-11 23:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.