Field Changed Event Inside a Collection Field Handled by Outer Form
I am trying to get a change inside a collection field to trigger a change to the main form, but I am having trouble.
If I use the ValueChanged event from inside the collection field's UIModel, that works great, but then when I try to access the RootUIModel() to get to the parent form it returns null.
If I try to use the ValueChanged event on the collection field from the main form's UIModel, the event never fires. I've found that ActiveRecordChanged() fires, but this isn't specific enough, nor useful in the case when they are only working in one row.
Has anyone had success triggering events in the main form based on changes to collection field values?
If I use the ValueChanged event from inside the collection field's UIModel, that works great, but then when I try to access the RootUIModel() to get to the parent form it returns null.
If I try to use the ValueChanged event on the collection field from the main form's UIModel, the event never fires. I've found that ActiveRecordChanged() fires, but this isn't specific enough, nor useful in the case when they are only working in one row.
Has anyone had success triggering events in the main form based on changes to collection field values?
0
Comments
-
HI Harry,
I have not tried this There is a collectionfieldchanged event that may be handled in some forms. I haven't used it before.
Hope this helps.
Ernie0 -
I found a solution if anyone else is interested.
The collection field has .Value.ListChanged that fires anytime anything inside the collection field changes. This includes adding rows, removing rows, updating fields, changing properties, lots of things.
The event args e includes e.ItemChangedType which describes what the change was.
Casting the event args e to (CollectionFieldListChangedEventArgs)e gives an object that has the row index and a source event
Casting that source event (UIFieldChangedEventArgs)((CollectionFieldListChangedEventArgs)e).SourceEvent gives an object that includes useful things like field name and which property changed.
Hope this helps someone else.
2
Categories
- All Categories
- 6 Blackbaud Community Help
- 211 bbcon®
- 1.4K Blackbaud Altru®
- 402 Blackbaud Award Management™ and Blackbaud Stewardship Management™
- 1.1K Blackbaud CRM™ and Blackbaud Internet Solutions™
- 15 donorCentrics®
- 360 Blackbaud eTapestry®
- 2.6K Blackbaud Financial Edge NXT®
- 655 Blackbaud Grantmaking™
- 576 Blackbaud Education Management Solutions for Higher Education
- 3.2K Blackbaud Education Management Solutions for K-12 Schools
- 940 Blackbaud Luminate Online® and Blackbaud TeamRaiser®
- 84 JustGiving® from Blackbaud®
- 6.7K Blackbaud Raiser's Edge NXT®
- 3.7K SKY Developer
- 248 ResearchPoint™
- 120 Blackbaud Tuition Management™
- 165 Organizational Best Practices
- 240 Member Lounge (Just for Fun)
- 34 Blackbaud Community Challenges
- 37 PowerUp Challenges
- 3 (Open) PowerUp Challenge: Grid View Batch
- 3 (Closed) PowerUp Challenge: Chat for Blackbaud AI
- 3 (Closed) PowerUp Challenge: Data Health
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Product Update Briefing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports+
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Email Marketing
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Gift Management
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Event Management
- 3 (Closed) Raiser's Edge NXT PowerUp Challenge: Home Page
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Standard Reports
- 4 (Closed) Raiser's Edge NXT PowerUp Challenge: Query
- 796 Community News
- 3K Jobs Board
- 54 Blackbaud SKY® Reporting Announcements
- 47 Blackbaud CRM Higher Ed Product Advisory Group (HE PAG)
- 19 Blackbaud CRM Product Advisory Group (BBCRM PAG)

