Hi,
What is the difference between the CheckedChanged event and CheckedValueChanged event? They both appear to do the same thing on the surface. When would I use one versus the other?
thanks
Mario
Hi Mario,
There's really not much difference. The Checked property is a boolean, whereas the CheckedValue is an object. CheckedValue is used in cases where you are using DataBinding and binding to some type other than Boolean and handling the conversions using Parse/Format on the Binding, or maybe you are using a DataFilter. These are rare cases, though. So for most apps, the events are interchangeable.
There has to be two events, though, because of DataBinding. When you bind to a property, the BindingManager in DotNet looks for an event in the form of (propertyname)Changed so that it can detect when the value of that property changes. So there has to be an event for each property in case you are binding to one or the other.