2 dropdown in Datagrid

F

Flare

Hi

I have a datagrid. One colum has a Country DropDownList and another has an
Area DropDownList.

I want to reflect changes in Country DDL to Area DDL. Eg. if I choose USA
Area is filled with the states in USA.

Fine.

1. Im aware that I have to databind in ItemDatabound. Fine..At least for the
Country drop down wich is static.
2. I know the Country DDL should have AutoPostBack enabled. Done.
3. I have made an event handler on the Country DDL
OnSelectedItemIndexChanged wich I catch in the codebehind. Is done and
works.

BUT here is my problem. In the ItemDatabound (on the datagrid) i can´t
register changes in the Country DDL (and i undestand why). After the
ItemDataBound event is handeld the OnSelectedItemIndexChanged event is
fired. Here I can register the change in the Country DLL. But hey!. Its too
late to bind tje Area DDL. ItemDataBound has already been fired.

How do I get "in touch" with the Area DDL so I can attach a now datasource
and set SelectedIndex property?

Thanks in regards!
Anders
 

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,266
Messages
2,571,082
Members
48,773
Latest member
Kaybee

Latest Threads

Top