Link to home
Start Free TrialLog in
Avatar of ba272
ba272

asked on

ListView SelectedIndexChanged is firing multiple events

Greetings,

I have handled the SelectedIndexChanged for a ListView, but am finding it's firing three times for one click in the ListView.  I put a breakpoint there and it breaks there three times.  Could this be the interaction with the debugger?

Thanks,
Bob
ASKER CERTIFIED SOLUTION
Avatar of anyoneis
anyoneis
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ba272
ba272

ASKER

.NET 1.1
Hello

Install latest service pack, it may be a bug. I currently use .net 2 and doesn't seem to have this problem.

Good luck
Avatar of ba272

ASKER

HeidarV,

How do I check the version of .NET I am using?

Thanks,
Bob
Hello Bob

If you use visual studio 2003 .net is 1.1 and if you use visual studio 2005 .net is version 2.
Avatar of ba272

ASKER

Thanks,
Bob
In the meantime I even tried setting an "updating" flag before and after I do anything with the UserLIstView, still no luck:
if (!_isupdating)
            {
                try
                {
                    string sID = UserListView.SelectedItems[0].SubItems[0].Text;
                    if (radioButtonEditMode.Checked)
                    {
                        //ResetFields();
                        LoadSpecificUser(Convert.ToInt32(sID));
                    }
                }
                catch (Exception ex)
                {
                    string sTest = ex.Message;
                    MessageBox.Show("Please set the security level");
                    return;
                }
            }

Open in new window

Sorry, wrong post.  Delete the above, mods, if you like.

tom