CheckedListBox Help Pls

sridhar_l

Member
Joined
Jul 21, 2005
Messages
6
Programming Experience
3-5
Hi Everyone,
Iam getting problem with Checked List Box. Please help me.
I have two CLBs. In first one i want to display EmpId and EmpName through Emp Table. Aterthat, when i pressed a button the selected item has to go to the right one. and vice versa also. Then last i want to save the items with id in a table.
Very urgent. please help me.

Advancely Thanks,
Sridhar.
 
Hey there,

On the Selected Index Changed event of the first box,
read the Display and Value member ib variables then write those
variables to the second chklbox.

so:

text = chklbox1.Displaymember
id = chklbox1.SelectedValue

then:

chklbox2.Item.Add(text)
chklbox2.Item(chklbox2.Item.Count).ValueMember = id
Try that and let me know
 
Checked List Box Help Pls

Hi,
Thanks for your help. But i didn't want like this.
I want to select multiple rows in the first List Box (values from data table). When click the Move Right button it has to go to the second List Box. And When i click the Move Left button after selecting multiple rows in Second List Box, it has to add in first List Box which the data will be from Data Table. so, i want to move EmpId and EmpName to both of the List Boxes.

Thanks,
Sridhar.
 
How about creating an array for which ever way your moving the data?

Move through the array the write the info to whichever lstBox you want to?
 
Back
Top