Field/Property changed event

Discussions related to SoftPro Select user interface development.

Moderator: Phil Barton

Post Reply
MattW
Posts: 46
Joined: Tue May 26, 2015 5:17 pm

Field/Property changed event

Post by MattW »

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?
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Field/Property changed event

Post by John Morris »

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
MattW
Posts: 46
Joined: Tue May 26, 2015 5:17 pm

Re: Field/Property changed event

Post by MattW »

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.
John Morris
Posts: 411
Joined: Thu Sep 11, 2008 11:35 am
Location: Raleigh, NC, USA
Contact:

Re: Field/Property changed event

Post by John Morris »

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
Post Reply