Announcement

As of April 17, 2018, this site is now in read-only mode. To start new Blackbaud Developer’s discussions, you will find Developer Discussions in the Blackbaud CRM Community.

To post or respond to Blackbaud Community discussions, you will have to login using a www.blackbaud.com login. Learn how to login here. If you have questions or need assistance, please email community@blackbaud.com.

1.7k questions

3.2k answers

401 users

Categories

1.7k questions

3.2k answers

401 users

I have a collection defined in my UI model for email data.

Private WithEvents _emails2 As Global.Blackbaud.AppFx.UIModeling.Core.CollectionField(Of BioUpdateRequestEditDataForm2EMAILS2UIModel)

I need to handle the event when the field _isprimary in the _emails2 collection is changed.

Private WithEvents _isprimary As Global.Blackbaud.AppFx.UIModeling.Core.BooleanField

I used the ColletionFieldChanged event, but it does not seem to be working.
What is the best way to do this ?
Test code for event handler is below.

Private Sub BioUpdateRequestEditDataForm2UIModel_CollectionFieldChanged(sender As Object, e As Blackbaud.AppFx.UIModeling.Core.CollectionFieldChangedEventArgs) Handles Me.CollectionFieldChanged
    Dim prompt = New UIPrompt
    prompt.Text = Me.ToString()
    prompt.ButtonStyle = UIPromptButtonStyle.Ok
    prompt.ImageStyle = UIPromptImageStyle.Information
    Me.Prompts.Add(prompt)
End Sub
asked by richgraham (182 points)

1 Answer

 
Best answer

You need to respond to the field changed event on the collection. When you create your UIModel it should generate a UIModel containing the base fields and a UIModel for every collection field. You need to create another class off of the generated partial class for that collection.

Public Class BioUpdateRequestEditDataForm2EMAILS2UIModel

    Private Sub _isprimary_ValueChanged(ByVal sender As Object, ByVal e As UIModeling.Core.ValueChangedEventArgs) Handles _isprimary.ValueChanged
		
    End Sub

End Class
answered by danielcooke (3.5k points)
selected by richgraham
...