C# ListView large multi selection

K

KotBegemot

I have a ListView with multi select
I have 2 events: SelectedIndexChanged and ItemSelectionChanged

If user selects 200 items, these events will be called for 200 times
How can I get only 1 event on this 200 multi selection ?

Thanks!
 
G

Gadget

I have a ListView with multi select
I have 2 events: SelectedIndexChanged and ItemSelectionChanged

If user selects 200 items, these events will be called for 200 times
How can I get only 1 event on this 200 multi selection ?

Thanks!

You can't. The component is not psychic, so it has no idea when the user
has clicked the 'last' item, and therefore could never know when to send
the one-and-only event.
You could ignore the Selection events entirely and just look at the
selected items when you want them, such as on the Leave event.

Cheers,
Gadget
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top