views:

548

answers:

1

The DataSource property on a CheckedListBox is hidden from Intellisense. Why? You can use the binding properties to make it work, but I'm worried that it's hidden for a reason and that I shouldn't be databinding on a CheckedListBox for some important reason that I'm not aware of.

Is databinding on a CheckedListBox ok??

+2  A: 

The CheckedListBox is intended to be used with its Add and AddRange methods:

To add objects to the list at run time, assign an array of object references with the AddRange method. The list then displays the default string value for each object. You can add individual items to the list with the Add method.

While data biding to the CheckedListBox may work you ought to avoid creating dependencies on anything but the public interface of a type. I would recommend that you use the proper methods as this will make you code less brittle in the event that Microsoft changes the implementation of CheckedListBox.

Andrew Hare
This is due to the fact that `CheckedListBox` inherits those members from `Control`. Certain aspects of data binding are still visible (most likely because they are still used under the covers).
Andrew Hare