Click here to Skip to main content
15,899,754 members
Home / Discussions / C#
   

C#

 
GeneralRe: Rendering forms from resource files. Pin
Scott Morken26-Feb-08 11:01
Scott Morken26-Feb-08 11:01 
GeneralRe: Rendering forms from resource files. Pin
led mike26-Feb-08 11:07
led mike26-Feb-08 11:07 
GeneralRe: Rendering forms from resource files. Pin
Scott Morken3-Mar-08 10:22
Scott Morken3-Mar-08 10:22 
Questionpintpreview Pin
AungPaoKung26-Feb-08 7:45
AungPaoKung26-Feb-08 7:45 
GeneralListView removes items too slow Pin
Xmen Real 26-Feb-08 6:13
professional Xmen Real 26-Feb-08 6:13 
GeneralRe: ListView removes items too slow Pin
Giorgi Dalakishvili26-Feb-08 6:31
mentorGiorgi Dalakishvili26-Feb-08 6:31 
GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 6:44
professional Xmen Real 26-Feb-08 6:44 
GeneralRe: ListView removes items too slow Pin
Guffa26-Feb-08 7:18
Guffa26-Feb-08 7:18 
As you are removing items from the collection, every iteration in the loop will create a completely new collection when you use the SelectedItems property.

Try this:

Copy the references from the SelectedItems collection to a new collection, and loop through that collection to remove the items:

listViewEx1.BeginUpdate();
List<ListViewItem> remove = new List<ListViewItem>(listViewEx1.SelectedItems);
foreach (ListViewItem item in remove) item.Remove();
listViewEx1.EndUpdate();

Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 14:43
professional Xmen Real 26-Feb-08 14:43 
GeneralRe: ListView removes items too slow Pin
Guffa26-Feb-08 21:15
Guffa26-Feb-08 21:15 
GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 21:25
professional Xmen Real 26-Feb-08 21:25 
GeneralRe: ListView removes items too slow Pin
Guffa26-Feb-08 21:58
Guffa26-Feb-08 21:58 
GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 22:00
professional Xmen Real 26-Feb-08 22:00 
GeneralRe: ListView removes items too slow Pin
Christian Graus26-Feb-08 9:48
protectorChristian Graus26-Feb-08 9:48 
GeneralRe: ListView removes items too slow Pin
Ed.Poore26-Feb-08 10:54
Ed.Poore26-Feb-08 10:54 
GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 14:24
professional Xmen Real 26-Feb-08 14:24 
GeneralRe: ListView removes items too slow Pin
Scott Dorman26-Feb-08 16:17
professionalScott Dorman26-Feb-08 16:17 
GeneralRe: ListView removes items too slow Pin
Xmen Real 26-Feb-08 16:52
professional Xmen Real 26-Feb-08 16:52 
GeneralFTP Command not implemented problem Pin
hi_siddhu26-Feb-08 6:07
hi_siddhu26-Feb-08 6:07 
GeneralRe: FTP Command not implemented problem Pin
Christian Graus26-Feb-08 9:54
protectorChristian Graus26-Feb-08 9:54 
Generalloader lock error using directX sound dll's Pin
rao raja26-Feb-08 5:55
rao raja26-Feb-08 5:55 
GeneralRe: loader lock error using directX sound dll's Pin
Judah Gabriel Himango26-Feb-08 6:29
sponsorJudah Gabriel Himango26-Feb-08 6:29 
GeneralRe: loader lock error using directX sound dll's Pin
rao raja26-Feb-08 14:59
rao raja26-Feb-08 14:59 
GeneralRe: loader lock error using directX sound dll's Pin
Judah Gabriel Himango27-Feb-08 4:32
sponsorJudah Gabriel Himango27-Feb-08 4:32 
QuestionActivator.Create instance - please save my sanity Pin
Nathan Gloyn26-Feb-08 5:31
Nathan Gloyn26-Feb-08 5:31 

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.