473,406 Members | 2,345 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

SelectedIndexChanged not firing on mouse click

I'm running into a strange problem (or at least it seems strange to me). I
have a standard list box (System.Windows.Form.ListBox) on a form and I'm
trying to trap for activity on the SelectedIndexChanged event. It works fine
if you change the selected item via the keyboard (arrow keys), but if you
click on a different item, the SelectedIndexChanged event is not getting
fired.

Has anyone else experienced this weird behavior? If so, is there a solution?
Or am I just looking in the wrong place and should be concentrating on a
different event?

Thanks!

evan stone | software engineer
----------------------------------------
santa rosa, ca, usa
Nov 17 '05 #1
3 3523
Hi Evan,

Could it be something similar to the situation described in the following
message thread (mind the line wraps)?

http://groups.google.com/group/micro...c33f129e224c79

--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]
"Evan Stone" <re*********************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
I'm running into a strange problem (or at least it seems strange to me). I
have a standard list box (System.Windows.Form.ListBox) on a form and I'm
trying to trap for activity on the SelectedIndexChanged event. It works
fine
if you change the selected item via the keyboard (arrow keys), but if you
click on a different item, the SelectedIndexChanged event is not getting
fired.

Has anyone else experienced this weird behavior? If so, is there a
solution?
Or am I just looking in the wrong place and should be concentrating on a
different event?

Thanks!

evan stone | software engineer
----------------------------------------
santa rosa, ca, usa


Nov 17 '05 #2
I believe so, yes. As it turns out, I _am_ doing a DoDragDrop call in the
MouseDown event, so that must be the problem.

Unfortunately, there's no real solution contained in that thread, and the
Syncfusion article referenced is a dead link.

If anyone has any further suggestions or information I'd appreciate it...
Or, I may just not worry about doing anything on the SelectedIndexChanged
event after all, if there's no easy(ish) solution.

Thanks!

evan stone | software engineer
----------------------------------------
santa rosa, ca, usa
"Dmytro Lapshyn [MVP]" <x-****@no-spam-please.hotpop.com> wrote in message
news:OP**************@TK2MSFTNGP09.phx.gbl...
Hi Evan,

Could it be something similar to the situation described in the following
message thread (mind the line wraps)?

http://groups.google.com/group/micro...c33f129e224c79
--
Sincerely,
Dmytro Lapshyn [Visual Developer - Visual C# MVP]

Nov 17 '05 #3
> Unfortunately, there's no real solution contained in that thread, and the
Syncfusion article referenced is a dead link.


The article was not deleted, it was just moved:

http://www.syncfusion.com/FAQ/Window...87c.aspx#q610q

:)

evan stone | software engineer
----------------------------------------
santa rosa, ca, usa
Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: LV | last post by:
Hello, When I manually set a list view item to be a selected item, the SelectedIndexChanged event is not firing. Am I missing something here? using System; using System.Windows.Forms; ...
0
by: PeacError | last post by:
Using Microsoft Visual Studio .NET 2003, Visual C# .NET 1.1: I apologize if this question has been addressed elsewhere, but I could not find a reference to it in the search engine for this...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
3
by: Lew Barnesson | last post by:
Hi All, I have looked and looked for an answer to the following problem (without success), and would be very grateful for a solution. The problem: The SelectedIndexChanged event code of an...
4
by: Paul Matthews | last post by:
Hi, SelectedIndexChanged NOT Firing in my DropDown ListBox AutoPostBack = true EnableViewState = True Autpostback works, but the SelectedIndexChanged Event does not fire !!! regards Paul
1
by: kevin | last post by:
Hi, I'm working with VS 2005 and Framework 2.0 I have a datagrid with a link and the selectedindexchanged will not fire. The page posts back but does nothing. Protected Sub...
3
by: Alec MacLean | last post by:
Hi, I have a couple of win forms where I am editing values that are stored in a SQL database. I'm using the listbox control to hold the data object each form interacts with. Each object is...
2
by: jnoody | last post by:
The problem I am having is with the SelectedIndexChanged event not always firing or the SelectedIndex property not being correct when the event does fire. The code is below, but here are some...
6
by: tbrown | last post by:
I have a combobox with items like this: {one,two,three}. The selected index is 0, so "one" appears in the combobox text. When the user drops down the list, and selects "two", for example, I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.