﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » Business Objects and Data Access (How do I?)  » How to get changes to a property on a control to update BO when using IBusinessBindable</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Wed, 09 Sep 2026 20:48:53 GMT</lastBuildDate><ttl>20</ttl><item><title>How to get changes to a property on a control to update BO when using IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8978.aspx</link><description>I'm still not understanding how to get SF to update data if I add the IBusinessBindable interface to a control.  My initial understanding was that I needed an event that changed after the bound property changed. I.e. if my control had a property called MyProperty that I wanted to be bindable (i.e. the property would be loaded with data by the BO and changes to the property would update the BO), I'd need a MyPropertyChanged event:&lt;br&gt;
[codesnippet]&lt;br&gt;
' The property that can be bound via SF&lt;br&gt;
Private _myProperty As Integer&lt;br&gt;
Public Property MyProperty() As Integer&lt;br&gt;
  Get&lt;br&gt;
    Return _myProperty&lt;br&gt;
  End Get&lt;br&gt;
  Set(value As Integer)&lt;br&gt;
    _myProperty = value&lt;br&gt;
    Me.OnMyPropertyChanged()&lt;br&gt;
  End Set&lt;br&gt;
End Property&lt;br&gt;
&lt;br&gt;
' The event that occurs after the property is changed&lt;br&gt;
Public Event MyPropertyChanged As EventHandler&lt;br&gt;
Protected Overridable Sub OnMyPropertyChanged(e As EventArgs)&lt;br&gt;
  Raiseevent MyPropertyChanged(Me,e)&lt;br&gt;
End Sub[/codesnippet]&lt;br&gt;
&lt;br&gt;
However, this didn't work. :(&lt;br&gt;
&lt;br&gt;
Next I noticed that in the SF RichTextbox, you implemented the INotifyPropertyChanged interface, so I tried that. I created an event called PropertyChanged and raise that event in the set of any properties I want to be bindable.  Again it didn't update the BO. &lt;br&gt;
&lt;br&gt;
How do I get the BO to know when the property changes, so it updates itself with the new data?</description><pubDate>Wed, 23 May 2007 16:27:56 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to get changes to a property on a control to update BO when using IBusinessBindable</title><link>http://forum.strataframe.net/FindPost9016.aspx</link><description>Yep, its all clear now.  :D  And its working :w00t:</description><pubDate>Wed, 23 May 2007 16:27:56 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: How to get changes to a property on a control to update BO when using IBusinessBindable</title><link>http://forum.strataframe.net/FindPost9002.aspx</link><description>Hehe, yes, you'll have to bubble the event up for it to work.&amp;nbsp; However, you only need to create the event if you're creating a custom property.&amp;nbsp; For instance, we inherited TextBox and since it already had a TextChanged event, we didn't have to create a new one since we didn't define the Text property.&lt;/P&gt;&lt;P&gt;So, only when you define the property do you need to handle the changed events yourself.&amp;nbsp; Hope that helps.</description><pubDate>Wed, 23 May 2007 14:13:13 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: How to get changes to a property on a control to update BO when using IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8979.aspx</link><description>I found the problem I was having. The control was never firing either the [property]Changed event or the PropertyChanged event because I wasn't bubbling the required event up from the base control.  Now [b]BOTH[/b] of the methods outlined in the original post work.   :blush:&lt;br&gt;
&lt;br&gt;
Hope this helps somebody else!</description><pubDate>Tue, 22 May 2007 19:24:27 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>