Binding ContextChanged

This event is raised when the binding context of the bookmark changes. The BindingContext object manages which data source you are binding to. If the BindingContext changes, it may mean that you are now bound to a different data source. The BindingContextChanged event handler lets you take action when the BindingContext property of a bookmark is changed. The code in Listing 6.24 displays a message when the binding context of a Bookmark control changes.

Listing 6.24. Displaying a message when the binding context of a bookmark changes

Private Sub Bookmark1_BindingContextChanged(ByVal sender As _ System.Object, ByVal e As System.EventArgs) Handles _ Bookmark1.BindingContextChanged

MsgBox("BindingContext changed")

End Sub

Was this article helpful?

0 0

Post a comment