SelectedIndexChanged with WebControls.Table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What is the secret to getting the DropDownList.SelectedIndexChanged event to
fire when its Parent is a TableCell?

My Page_Load event creates the DropDown, sets AutoPostBack=true, and wires
up the SelectedIndexChangeEvent. After that is done I add it to a
TableCell.Controlls collection.

When I change the value in the dropdown, my page reposts but no event!?

What am I missing?
 
You have to recreate the dropdown on postback to get the event.

What is the secret to getting the DropDownList.SelectedIndexChanged event to
fire when its Parent is a TableCell?

My Page_Load event creates the DropDown, sets AutoPostBack=true, and wires
up the SelectedIndexChangeEvent. After that is done I add it to a
TableCell.Controlls collection.

When I change the value in the dropdown, my page reposts but no event!?

What am I missing?
 
I am recreating the dropdown on each request. I am not sure what you mean by
getting the event though. Can you elaborate?
 
To have the SelectedIndexChanged event fire, the DropDown control should be
created on every postback.

Probably, posting your code will help us see what is happening.

I am recreating the dropdown on each request. I am not sure what you mean
by
getting the event though. Can you elaborate?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top