By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,905 Members | 2,083 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,905 IT Pros & Developers. It's quick & easy.

ListBox vs. ListView

P: n/a
Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.

Thanks,
Mike
Nov 18 '08 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"Mike" <ML****@hotmail.comwrote in message
news:26**********************************@r37g2000 prr.googlegroups.com...
Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
It does? How do it KNOW that the selections are complete?

(I, for one, welcome our new telepathic list box overlords....)
Nov 18 '08 #2

P: n/a
On Nov 18, 4:32*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:26**********************************@r37g2000 prr.googlegroups.com...
Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.

It does? How do it KNOW that the selections are complete?

(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?
Nov 18 '08 #3

P: n/a
"Mike" <ML****@hotmail.comwrote in message
news:c1**********************************@a3g2000p rm.googlegroups.com...
>>Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
>It does? How do it KNOW that the selections are complete?
>(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?
Well, you didn't specify what type of multi-selection you were using.
There's also the type where you can Ctrl+click items, and do it as many
times as you want.

And you're saying that the first click (on the "anchor" item) doesn't fire
SelectedIndexChanged? I'm having difficulty believing that.
Nov 18 '08 #4

P: n/a
On Nov 18, 4:59*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:c1**********************************@a3g2000p rm.googlegroups.com...
>Is there a way to get a ListView control to fire its
SelectedIndexChanged event like the ListBox control? When the user
selects multiple items at once, the ListView fires the event as each
item gets selected. The ListBox waits to fire the event until all
selections are complete.
It does? How do it KNOW that the selections are complete?
(I, for one, welcome our new telepathic list box overlords....)
How could it not know? If I click on the first of 100 items and then
shift-click the last item, I think the control needs to know it is
selecting all 100 items or else how could it do it?

Well, you didn't specify what type of multi-selection you were using.
There's also the type where you can Ctrl+click items, and do it as many
times as you want.

And you're saying that the first click (on the "anchor" item) doesn't fire
SelectedIndexChanged? I'm having difficulty believing that.
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.

Second, I never said that the first click doesn't fire the event. I am
only talking about the shift-click situation. Again, that single click
is not selecting multiple items at one time.
Nov 18 '08 #5

P: n/a
"Mike" <ML****@hotmail.comwrote in message
news:37**********************************@k1g2000p rb.googlegroups.com...
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.
Welcome to the ambiguity of the English language. To you, "at once" meant in
a single action. To me, it meant "without doing anything else in the
application in-between, like clicking on a button." Saying "Shift+click," as
you did in your first reply, makes it perfectly clear, though, and now we're
on the same page, although ultimately I don't think you're going to get the
answer you want.
Nov 18 '08 #6

P: n/a
On Nov 18, 5:19*pm, "Jeff Johnson" <i....@enough.spamwrote:
"Mike" <MLM...@hotmail.comwrote in message

news:37**********************************@k1g2000p rb.googlegroups.com...
First, I said this is when they select multiple "at once". Sorry that
wasn't clear enough for you, but the shift-click is the only way I'm
aware of to do that. With ctrl+click, you pick items one at a time,
not all at once.

Welcome to the ambiguity of the English language. To you, "at once" meantin
a single action. To me, it meant "without doing anything else in the
application in-between, like clicking on a button." Saying "Shift+click,"as
you did in your first reply, makes it perfectly clear, though, and now we're
on the same page, although ultimately I don't think you're going to get the
answer you want.
Yeah, I looked around quite a bit for this already and came up empty.
Just thought I'd post the question as a last resort in case anybody
had an idea.
Nov 18 '08 #7

This discussion thread is closed

Replies have been disabled for this discussion.