SelectedIndexChanged

  • Thread starter Thread starter Jon Cosby
  • Start date Start date
J

Jon Cosby

How does the "SelectedIndexChanged" event work on a dropdown list? I have

private void InitializeComponent()
{
this.ListClients.SelectedIndexChanged += new
System.EventHandler(this.ListClients_SelectedIndexChanged);
}

private void ListClients_SelectedIndexChanged(object sender,
System.EventArgs e)
{
// Do something

}

but it never gets to the event handler when I select an item on the list.
Does "SelectedIndex" have some dubious meaning I'm not aware of?


Jon Cosby
 
Hi

Why are you adding an event handler to the event SelectedIndexChanged when it already exists natively

Michael H

----- Jon Cosby wrote: ----

How does the "SelectedIndexChanged" event work on a dropdown list? I hav

private void InitializeComponent(

this.ListClients.SelectedIndexChanged += ne
System.EventHandler(this.ListClients_SelectedIndexChanged)


private void ListClients_SelectedIndexChanged(object sender
System.EventArgs e

// Do somethin



but it never gets to the event handler when I select an item on the list
Does "SelectedIndex" have some dubious meaning I'm not aware of


Jon Cosb
 
Michael H. said:
Hi,

Why are you adding an event handler to the event SelectedIndexChanged when it already exists natively?
I'm just using the auto-generated code to specify the event procedure.


Jon
 
Back
Top