views:

251

answers:

1

Can anyone tell me the pros and cons of using the checkboxes checked property vs the CheckState property for databinding?

Thanks.

+1  A: 

Checked can only be true or false (presenting a checkmark or none), while CheckState can also be undetermined, meaning a partially greyed checkmark representing neither true nor false.

Nb. When CheckState is indeterminate, Checked is true. Maybe irrelevant for your situation, but it might still be important.

Webleeuw
That last bit is something good to keep in mind.
Marshall
I have two databindings available - Checked and CheckState. If I bind my Boolean to Checked and the DB value is Null, what value does Checked get - true or false? It seems obvious that with CheckedState the DBNull would be represented by CheckState = indeterminate. Right?
Marshall
I suspect that DBNull results in Checked = false and CheckState = Indeterminate, but your best bet is of course to try it yourself :).
Webleeuw