Click here to Skip to main content
15,917,481 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
How to transfer data from one checked list box to another checked list box ?


[Digimans: removed uppercase shouting]
[Björn Ranft: removed Subject shouting]
Posted
Updated 12-Mar-12 0:57am
v3
Comments
Herman<T>.Instance 12-Mar-12 6:52am    
NO SHOUTING, that is considered rude. Just use normal casing

This link can help You !
http://social.msdn.microsoft.com/Forums/en/vbgeneral/thread/a5c83bff-ba98-4a84-b8eb-c83dedf80228
 
Share this answer
 
 
Share this answer
 
Hello,
if you want to copy items from one to another checked list box you can use this :

C#
int i = 0;
int k = 0;
i = checkedListBox1.Items.Count;
for (k = 0; k != i; k++)
{
 checkedListBox2.Items.Add(checkedListBox1.Items[k]);
}


In the above exmpl. you copy items from checkedListBox1 to checkedListBox2,
so they will have exactly the same check box list. If you want to copy some of the items and not all , you need to do that manually by declaring the index of item.

C#
checkedListBox2.Items.Add(checkedListBox1.Items[index]);


All the best,
Perić Željko
 
Share this answer
 
v2

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