We help IT Professionals succeed at work.

Problem with several CheckedListBox

534 Views
Last Modified: 2012-02-10
Hello EE,

I have a FlowLayoutPanel in wich contains dynamic CheckedListBox. the number may vary depending on what the user do.

Lets say we have 4 of them.
In my DB, I have a table called Code and in it I have 4 Colums

ACtually the table is created dynamically also. so If there is 4 colums I have 4 CheckedListBox...if 6 then 6 etc...

When the application starts, the first item of the first CheckedListBox is selected and then all the others are populated from that ID (because the first box is the ID of the table)

My problem is that I need to "Checked to True" all the item in the 3 others boxes related to this ID

And if the user click on another ID it needs to switch to all goods checked value from that ID

can you help ?  Lets say the SELECT is already in a DataTable.. from there, can you help ?
you can use linq anything you want...  BTW i code in vb.net
Comment
Watch Question

nishant joshiTechnology Development Consultant
CERTIFIED EXPERT

Commented:
are you loking for radiobutton?
Philippe RenaudVice President

Author

Commented:
Huh,

I am lookinf for a way to checked to True the checkboxes in all the CheckedListBox I have.

lets say Data Table is liek this :

ID       Desc1       Desc2            Desc3
1          test          hello               hi
1          test           ghj                yu8
2            55            03e                78
3            55            03e                0003  


I would have checked all the rows in all the checkedBoxes that match thoses results you know ?

Checklist box 1   has the following:

1
2
3


check list box 2 has the following:
test
55


etc...
I dont know how to loop the checkedlistbox and the dataTable to do that in a good way
CERTIFIED EXPERT
Most Valuable Expert 2012
Top Expert 2014
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Philippe RenaudVice President

Author

Commented:
thanks. I can manage it.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.