blah blah blah is here! blah blah » Close

up0down
link

Hello,
I have a CheckedListBox on a winform and some of its items are checked
by default. I want to disable the checked items so that user can not
uncheck them during selecting other items (as it is add dialog not
edit). Is there any way I can do so. I tried to search about it on the
internet but unable to find any workaround for it. Any help would be
appretiated.
Thanks.

last answered 2 years ago

1 answers

up0down
link

just off the top of my head, why don' t you simply loop through the items and if its checked, set the disabled property to TRUE.
does that help?

up0down
link

Hello!
disabled property of what salman :)
CheckedListBox.Items[index] returns an object, infact Items is an ObjectsCollection so there is no way that I can get 'disabled' property for an object. And by the way, we have Enabled property everywhere in the .net (atleast i didn't see disabled property anywhere) :)
anyways, thanks for answering.
Cheers :)

up0down
link

One thing I forgot to mention that CheckedListBox.CheckedItems[index] also returns object.

This post was imported from csharpfriends, if you have a similiar question please ask it again.

All previous members have been migrated, hope you enjoy the new platform!

Feedback