Russ Suter
asked on
Responding to a property change event
I tried following this example (http://stackoverflow.com/questions/2246777/raise-an-event-whenever-a-propertys-value-changed) but nothing fired so I just decided to implement the PropertyValueChanged event of the PropertyGrid control. That works but what I need to do is get the actual instance and property of the class that is being affected. Anyone know how I can do this via the event implementation?
void propertyGrid1_PropertyValueChanged(object s, System.Windows.Forms.PropertyValueChangedEventArgs e)
{
// What do I put here to get the instance of the bound object and the property being changed?
}
ASKER
I don't want the GridItem. I want the object that represents the actual property of the underlying class.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
e.OldValue is the oldvalue
e.ChangedItem.value is the new value