why is this SelectedIndexChanged event handler called when I set theDataSource

  • Thread starter Thread starter tony
  • Start date Start date
T

tony

Hello!
I have ComboBox control called comboBoxSchedule and when I execute
comboBoxSchedule.DataSource = ds.Tables[0];
the event handler below is called.
private void comboBoxSchedule_SelectedIndexChanged(object sender,
EventArgs e)

Can somebody explain why this event handler is called.

//Tony
 
Hello!
I have ComboBox control called comboBoxSchedule and when I execute
comboBoxSchedule.DataSource    = ds.Tables[0];
the event handler below is called.
private void comboBoxSchedule_SelectedIndexChanged(object sender,
EventArgs e)

Can somebody explain why this event handler is called.

//Tony

Because the "SelectedIndex" is changed to the first item in the table.

Tom P.
 
how can i trigger my OnSelectedIndexChanged programatically?

i mean do it code behind...

i already added the event on my aspx and in my page_load i have a
function that populates my datagrid and automatically select the index
0
 
Back
Top