Click here to Skip to main content
16,012,759 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
hi..

can anyone help me in retaining the state of checkbox and checkedlistbox in c#,whenever the form loads...

I tried doing it by storing in setting.settings but unable to achieve it..
Posted
Comments
Hugo1991 8-Dec-11 6:12am    
Where is your code? I need to see this
singh.amit777 8-Dec-11 6:14am    
Hiput a loop of list count and { checkbox1.SetItemChecked(i, true); }

as I understood ur problem. if not please explain more what u need to perform

Thanx
Amit Singh
pune
bhagyap 8-Dec-11 6:29am    
i hav an checkedlistbox in form1 which i am accessing in form2 and based on my checkeditems in form1 i am building a treeview so wenever i access form1 from form2 i want the state of checkedlistboxes and the checkbox to be retained..
singh.amit777 8-Dec-11 6:37am    
okas i mentioned u can make a list of checked state items in form1 and acces that from form2 and build a tree accordingly I mean u have to pass that list from form1 to form2 hope this will work :)

Amit Singh

1 solution

Use database,file IO or registry. If you want help on how to use it. Google will help.
 
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