Solved

Selected Index Changed fires twice?

Posted on 2006-11-06
3
301 Views
Last Modified: 2008-03-04
Is it true that Selected Index Changed event ACTUALLY fires twice, once when you leave the row you are on, and once when you "highlight" the new row (the new row receives the focus) ?
0
Comment
Question by:knowlton
  • 2
3 Comments
 
LVL 17

Accepted Solution

by:
ZeonFlash earned 500 total points
Comment Utility
What control are you referring to?  

I would rather seriously doubt that it does, in any case.  The change event is a single occurrence, much like a light bulb.  When you hit the switch, the bulb CHANGES from Off to On...it doesn't register a state of "in between".  So when, for example, a combobox has a selected index change, it's a single event going from Index A to Index B.  It doesn't go from Index A to Index NULL, then again from Index NULL to Index B.
0
 
LVL 5

Author Comment

by:knowlton
Comment Utility
What about ListViews?
0
 
LVL 17

Expert Comment

by:ZeonFlash
Comment Utility
For ListBoxes, the behavior is the same, and is extended by the SelectionMode:

One - SelectedIndexChanged is fire everytime an item is clicked.
MultiSimple - Fired everytime an item is selected OR de-selected.
MultiExtended - Fired everytime an individual item is clicked (selected or de-selected), but when holding the shift key and clicking, the event only fires once (even though multiple items may have been highlighted)
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Retain selection in datagridview 2 22
Template or Software to write user guide 2 29
Expando 4 33
Form design in vb.net 7 18
If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now