Raise FieldPropertyChanged event for custom field


Author
Message
Chan
Chan
Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)Advanced StrataFrame User (723 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I have custom field property which is not exist in underlying table. I would like to raise FieldPropertyChanged event upon changed made to this field.



I added code to raise FieldPropertyChanged event by referring code generated by BO Mapper. However, I am not sure what Field enum to be passed. I found that is CUSTOM_FIELD enum. But how could I know which field changed if I have more than one custom field if I pass CUSTOM_FIELD to FieldPropertyChanged event?



Thank you
StrataFrame Team
S
StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)StrataFrame Developer (4.6K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
I would just create a new event args type that inherits from FieldChangedEventArgs and adds a string property to store the field that changed, then, you can pass those event args instead and if the event args are that type (by using "as" and testing variable on null), then check the field name from your new property.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search