Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
I have the two listboxes.
First list box. i will have the emp name.

Based on the first listbox selection (ex: Emp_name-->Robert), i want to fetch the department (like A,B,C,D,E,etc) with checkbox.

How to do this...?

see example.

ListBox1
---------
"Robert
Raghu
Alfred->Selected"


ListBox2 - Alfred
------------------
"Checkbox1:A
CheckBox2:B
Checkbox3:C
Etc.,"
Posted

1 solution

write your item addition code on ListBox1's SelectedItemChanged Event

ListBox2.Items.clear

Listbox2.items.add("CheckBox1:A")
Listbox2.items.add("CheckBox1:B")
Listbox2.items.add("CheckBox1:C")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900