Field/Property changed event
Moderator: Phil Barton
Field/Property changed event
I've looked over the sdk,forums, and just played around with the code/api. I'm trying to find an event when a specific property on the order is changed. I know there is the order.Changed event and this does fire every time a property changes, but all it passes in is the whole order after updated, it does not tell which field was updated let alone its previous value. Are there any other OnChanged/Changed events that also pass something to indicate what property was actually changed?
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Field/Property changed event
Every IOrderItem object also implements the System.ComponentModel.INotifyPropertyChanged interace. That event will tell you when a property changes at the object level. There is no event that will tell you the original value of the property. These events fire *after* the value has already changed.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro
Re: Field/Property changed event
Thank you for the response. I'm still having a hard time seeing where and how to tie into these events. When I look at the definition of IOrderItem it has no references to INotifyPropertyChanged anywhere that I could find, grabbing an instance of an IOrderItem yields no intuitive path that I can discern either. Would you be able to provide an example of how to tie into this event for a property(settlement date for example)?
If it matters we are currently using version 4.0.30302.62.
Thank you in advance.
If it matters we are currently using version 4.0.30302.62.
Thank you in advance.
-
- Posts: 411
- Joined: Thu Sep 11, 2008 11:35 am
- Location: Raleigh, NC, USA
- Contact:
Re: Field/Property changed event
IOrderItem does not inherit that interface. However, the classes that implement IOrderItem also implement INotifyPropertyChanged. If you simple cast an IOrderItem instance to INotifyPropertyChanged, it will work.
John Morris
Sr. Software Architect
SoftPro
Sr. Software Architect
SoftPro