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

C#

 
AnswerRe: Execute code only if query successful Pin
Pravin Patil, Mumbai31-Jan-11 19:03
Pravin Patil, Mumbai31-Jan-11 19:03 
AnswerRe: Execute code only if query successful Pin
Michael Kingsford Gray1-Feb-11 1:09
Michael Kingsford Gray1-Feb-11 1:09 
GeneralRe: Execute code only if query successful Pin
Joe Stansfield1-Feb-11 11:10
Joe Stansfield1-Feb-11 11:10 
AnswerRe: Execute code only if query successful Pin
meaningoflights1-Feb-11 17:58
meaningoflights1-Feb-11 17:58 
QuestionHow to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 3:23
professionalChesnokov Yuriy31-Jan-11 3:23 
AnswerMessage Removed Pin
31-Jan-11 3:38
Pravin Patil, Mumbai31-Jan-11 3:38 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 4:02
professionalChesnokov Yuriy31-Jan-11 4:02 
AnswerRe: How to load 100,000 list view items without application freeze? PinPopular
Dave Kreskowiak31-Jan-11 3:40
mveDave Kreskowiak31-Jan-11 3:40 
First, putting 100,000 items in a ListView control is ridiculous. Do you really think a user wants to scroll through all that just to find a particular record??

If you add all the items to the listView all at once, there's no way to avoid the "freeze". That's because the UI thread has to handle adding those items to the ListView. it cannot be done from another thread because you can only maniplute a control on the thread that created it.

You can, however, add each item tot he ListView, one a few at time, from a background thread, by Invoking a method on the UI thread to add just a few items at a time. This will give the UI thread time to handle other requests, but it'll take considerably longer to add your 100,000 items.

You have a serious design flaw in your app if you think you need to show 100,000 items in a single control.

GeneralRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 4:01
professionalChesnokov Yuriy31-Jan-11 4:01 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Richard MacCutchan31-Jan-11 4:05
mveRichard MacCutchan31-Jan-11 4:05 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
OriginalGriff31-Jan-11 4:09
mveOriginalGriff31-Jan-11 4:09 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 6:40
professionalChesnokov Yuriy31-Jan-11 6:40 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Eddy Vluggen31-Jan-11 7:13
professionalEddy Vluggen31-Jan-11 7:13 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 9:48
professionalChesnokov Yuriy31-Jan-11 9:48 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Pete O'Hanlon31-Jan-11 9:50
mvePete O'Hanlon31-Jan-11 9:50 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Eddy Vluggen31-Jan-11 10:44
professionalEddy Vluggen31-Jan-11 10:44 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Not Active31-Jan-11 12:13
mentorNot Active31-Jan-11 12:13 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Fabio Franco1-Feb-11 4:08
professionalFabio Franco1-Feb-11 4:08 
GeneralRe: How to load 100,000 list view items without application freeze? Pin
Dave Kreskowiak31-Jan-11 7:34
mveDave Kreskowiak31-Jan-11 7:34 
AnswerRe: How to load 100,000 list view items without application freeze? Pin
Chesnokov Yuriy31-Jan-11 9:56
professionalChesnokov Yuriy31-Jan-11 9:56 
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 

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.