Problem with ListView and OnSelectedIndexChanged

  • Thread starter Thread starter Noxis
  • Start date Start date
N

Noxis

I'm having problems with the OnSelectedIndexChanged event firing twice
when a ListView item is selected and not at all if I click on an
already selected index. I've read older postings and other people
seem to have experienced the same problem, but it seems that it hasn't
been addressed.

If anyone can help, I would really appreciate it,
Thanks
 
What happen there is the event get fire as you lost the focus as well as get
the focus I mean in both the case it is a selected index change... quite
understandably if you select the already selected item again then the event
is not fired since you have not change the slected index of the item

Nirosh.
 
Ok, that makes sense (thanks for the prompt reply). Is there an event
to capture the reselection of an item?
 
I think you have to use the mouse click/ down event and get the
corresponding item by
listView1.GetItemAt(x, y);

Nirosh.
 
I started using the OnEnter event, but may be the mouse click down
event is more direct. Thanks a lot for your advice... I owe you a
beer :)

Noxis
 
Back
Top