problems in checklistbox
-
Hi I have written this code in web based form for checkListBox and getting "chkListAttribute.Items[iCount].Selected" AS true/false value but while using this in WINDOWS APPLICATION i am not getting "chkListAttribute.Items[iCount].Selected" (DOT Selected) . How can I do this by this process.Please help for (int iCount = 0; iCount < chkListAttribute.Items.Count; iCount++) { if (chkListAttribute.Items[iCount].Selected == true) { if (chkListAttribute.Items.Count == 0) -- do something else -- do something } } Thanks In Advance Amitava
-
Hi I have written this code in web based form for checkListBox and getting "chkListAttribute.Items[iCount].Selected" AS true/false value but while using this in WINDOWS APPLICATION i am not getting "chkListAttribute.Items[iCount].Selected" (DOT Selected) . How can I do this by this process.Please help for (int iCount = 0; iCount < chkListAttribute.Items.Count; iCount++) { if (chkListAttribute.Items[iCount].Selected == true) { if (chkListAttribute.Items.Count == 0) -- do something else -- do something } } Thanks In Advance Amitava
The System.Windows.Forms.CheckedListbox contains the following properties that you can use to find out what nodes are selected: .SelectedIndex .SelectedIndices .SelectedItem .SelectedItems .SelectedValue If you want to find out which ones are checked you should use any of the following: .CheckedIndices .CheckedItems