Link to home
Start Free TrialLog in
Avatar of acsakany
acsakany

asked on

FormView and EditItemTemplate

I have a FormView that has DefaultMode="Edit".  I have three DropDownLists in the EditTemplate. One each for city, state, and country. When I retrieve the city from the database (sqlDataSource) I then need to fill the DropDownLists with the appropriate info and SelectedValues. I tried coding this in the OnSelected Method but I don't think it is the way to go.

Any quick suggestions?
Avatar of carlnorrbom
carlnorrbom
Flag of Sweden image

Hi,

I don't fully understand exactly what you want to do, do you want to populate the dropdown for state upon selection of country and then populate the dropdown for city upon selection of state?

/Carl.
Avatar of acsakany
acsakany

ASKER

No, the opposite. The city code is stored in the table. I need to load all the countries and then make the selected value  of the countries based upon the country from the city. I then need to load the states/provinces from that country and do the same for that selected value and the same for the citeis.

The I tried to do this in the OnInserted but none of the dropdownlists I get an error message about the dropdown lists being instantaited (I am not too sure exactly what the message is because the messages are in french).

So I am just wondering if there is some way I could populate the drop down lists based upon data retrieved from the database. Remember that the FormViews default mode is Edit.
ASKER CERTIFIED SOLUTION
Avatar of acsakany
acsakany

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial