Connecting Tech Pros Worldwide Help | Site Map

Problem with ListView and OnSelectedIndexChanged

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 15th, 2005, 03:30 PM
Noxis
Guest
 
Posts: n/a
Default Problem with ListView and OnSelectedIndexChanged

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

  #2  
Old November 15th, 2005, 03:31 PM
Champika Nirosh
Guest
 
Posts: n/a
Default Re: Problem with ListView and OnSelectedIndexChanged

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.

"Noxis" <maxwellpatten@hotmail.com> wrote in message
news:23122923.0311261458.21a737ab@posting.google.c om...[color=blue]
> 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[/color]


  #3  
Old November 15th, 2005, 03:32 PM
Noxis
Guest
 
Posts: n/a
Default Re: Problem with ListView and OnSelectedIndexChanged

Ok, that makes sense (thanks for the prompt reply). Is there an event
to capture the reselection of an item?

"Champika Nirosh" <cnirosh@textcentric.lk> wrote in message news:<#F79nLKtDHA.2508@TK2MSFTNGP12.phx.gbl>...[color=blue]
> 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.
>
> "Noxis" <maxwellpatten@hotmail.com> wrote in message
> news:23122923.0311261458.21a737ab@posting.google.c om...[color=green]
> > 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[/color][/color]
  #4  
Old November 15th, 2005, 03:34 PM
Champika Nirosh
Guest
 
Posts: n/a
Default Re: Problem with ListView and OnSelectedIndexChanged

I think you have to use the mouse click/ down event and get the
corresponding item by
listView1.GetItemAt(x, y);

Nirosh.

"Noxis" <maxwellpatten@hotmail.com> wrote in message
news:23122923.0311270500.662a04b@posting.google.co m...[color=blue]
> Ok, that makes sense (thanks for the prompt reply). Is there an event
> to capture the reselection of an item?
>
> "Champika Nirosh" <cnirosh@textcentric.lk> wrote in message[/color]
news:<#F79nLKtDHA.2508@TK2MSFTNGP12.phx.gbl>...[color=blue][color=green]
> > What happen there is the event get fire as you lost the focus as well as[/color][/color]
get[color=blue][color=green]
> > 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[/color][/color]
event[color=blue][color=green]
> > is not fired since you have not change the slected index of the item
> >
> > Nirosh.
> >
> > "Noxis" <maxwellpatten@hotmail.com> wrote in message
> > news:23122923.0311261458.21a737ab@posting.google.c om...[color=darkred]
> > > 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[/color][/color][/color]


  #5  
Old November 15th, 2005, 03:36 PM
Noxis
Guest
 
Posts: n/a
Default Re: Problem with ListView and OnSelectedIndexChanged

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

"Champika Nirosh" <cnirosh@textcentric.lk> wrote in message news:<#BaP99VtDHA.3224@tk2msftngp13.phx.gbl>...[color=blue]
> I think you have to use the mouse click/ down event and get the
> corresponding item by
> listView1.GetItemAt(x, y);
>
> Nirosh.
>
> "Noxis" <maxwellpatten@hotmail.com> wrote in message
> news:23122923.0311270500.662a04b@posting.google.co m...[color=green]
> > Ok, that makes sense (thanks for the prompt reply). Is there an event
> > to capture the reselection of an item?
> >
> > "Champika Nirosh" <cnirosh@textcentric.lk> wrote in message[/color]
> news:<#F79nLKtDHA.2508@TK2MSFTNGP12.phx.gbl>...[color=green][color=darkred]
> > > What happen there is the event get fire as you lost the focus as well as[/color][/color]
> get[color=green][color=darkred]
> > > 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[/color][/color]
> event[color=green][color=darkred]
> > > is not fired since you have not change the slected index of the item
> > >
> > > Nirosh.
> > >
> > > "Noxis" <maxwellpatten@hotmail.com> wrote in message
> > > news:23122923.0311261458.21a737ab@posting.google.c om...
> > > > 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[/color][/color][/color]
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,662 network members.