In my CheckedListBox
app I want to allow only a single item to be checked.
I have these properties already set
checkOnClick = true;
SelectionMode = One;
Any advise will be appreciated
uncheck all other items in ItemCheck event as below :
private void checkedListBox1_ItemCheck(object sender, ItemCheckEventArgs e) {
for (int ix = 0; ix < checkedListBox1.Items.Count; ++ix)
if (ix != e.Index) checkedListBox1.SetItemChecked(ix, false);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With