SelectedIndexChanged with WebControls.Table

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?
 
S

Siva M

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?
 
G

Guest

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

Siva M

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

Members online

No members online now.

Forum statistics

Threads
474,430
Messages
2,571,676
Members
48,796
Latest member
Greg L.

Latest Threads

Top