Trouble with DropDownList

handsomed

New member
Joined
Aug 24, 2008
Messages
3
Programming Experience
Beginner
Hi there,
I have two Dropdownlist, one to load the workers of a company and the other to load the departments.
- One worker can work in more than one department.
- When I select one worker in the first Dropdownlist, the second Dropdownlist load the departments which that worker belongs.
- When I select one department in the second Dropdownlist, the first Dropdownlist load the workers who belong to that department.

- The problem I have is is the following:

- When I select any worker , his departments are loaded (that's ok). The problem is that when I select one of theses departments and the first dropdownlist is loaded with his workers, the worker firstly selected is "unselected" and the dropdownlist appears ordained. I'd like to keep the worker selected after selecting one department (and keeping loading their workers ).

Any ideas? Thanks.
 
er

what?

Didnt you ask this already, or am I thinking of someone else? So you have 2 lists and you want to select an item from the first list and that changes the second list, and then you want to select something from the second list and that will change the first list, and you also don't want the first list to change?

I'd recommend simplifying your goals slightly, dont try to reuse the lists; if you really must, then attempt to search the first list after you repopulate it and select the wanted worker (and then put extra code in to stop that change changing the departments list, which will change the.. can you see the headache youre creating for yourself?)
 
Back
Top