Filling data in a listbox based on multi selection in another list

A

Anand Vaidya

I have 4 list boxes -
lstDepartments_Available,lstDepartments_Selected,lstEmployees_Available and
lstEmployees_Selected.And 4 command buttons.Two command buttons (cmdAddDepts
and cmdRemoveDepts) between lstDepartments_Available and
lstDepartments_Selected and two buttons(cmdAddEmps and cmdRemoveEmps) between
lstEmployees_Available and lstEmployees_Selected.I am able to Add/Remove
Depts. between lstDepartments_Available and lstDepartments_Selected using
multiple selection.
I want to display all the employees in the lstEmployees_Available for all
the Departments selected in lstDepartments_Selected automatically.
say for eg. if I have dept1, dept2,dept3,dept4 in lstDepartments_Available
and I select dept1 and dept3 in lstDepartments_Available and click
cmdAddDepts to add it to lstDepartments_Selected,I want the
lstEmployees_Available to be filled with all the employees belonging to dept1
and dept3.
I am able to do the first part i.e. adding the dept1 and dept3 to the
lstDepartments_Selected.I would like to get the rest of the logic i.e.
filling lstEmployees_Available with the employees belonging to dept1 and
dept3.
 

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

Top