Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CheckedListBox - Prevent Check
Message
General information
Forum:
ASP.NET
Category:
Class design
Title:
CheckedListBox - Prevent Check
Miscellaneous
Thread ID:
01480838
Message ID:
01480838
Views:
121
C# WinForms app:

I want to prevent the user from changing the checked state of a list item in a CheckedListBox. I tried this:
private void lstRights_ItemCheck(object sender, ItemCheckEventArgs e)
{
    if (lstRights.SelectedIndices.Count > 0)
    {
        lstRights.SetItemCheckState(lstRights.SelectedIndices[0], e.CurrentValue);
    }
}
But it has not effect. The item is changed anyhow.

Anyone know how to do this?
Everything makes sense in someone's mind
public class SystemCrasher :ICrashable
In addition, an integer field is not for irrational people
Next
Reply
Map
View

Click here to load this message in the networking platform