I have been working on dependant checkboxlists and its a total madness both in c# and vb.net 2013.
I cannot find a property or a method to check whether an item inside a checkboxlist is checked or unchecked.
How can i simply perform the detection?
Suppose i have six checkboxlists and every item in the second / third .... six checkboxlist is dependent on the preceeding element.
I want to add/remove elements in 2nd, 3rd ..... 6th checkboxlist when the user checks or unchecks a particular item inside a checkboxlist.
Example: Product, Color, Size...
Any example link in vb.net or c# would be appreciated.
Many Thanks
Loading
theLizardPosted May 7, 2015, 5:58 PM
for (int i = 0; i < checkedListBox1.Items.Count; i++)
{
if (checkedListBox1.GetItemChecked(i) == true)
{
checkedListBox1.SetItemChecked(i, false);
}
else
{
checkedListBox1.SetItemChecked(i, true);
}
}
This is a guide only, make it work for you the way you want it to.
Nabeeha DeedarPosted May 7, 2015, 10:31 AM
Dipankar BiswasPosted May 7, 2015, 9:52 AM
see this link...https://msdn.microsoft.com/en-us/library/system.windows.forms.checkedlistbox.checkeditems%28v=vs.110%29.aspx