﻿<?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?)  » Trouble with 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 14:45:54 GMT</lastBuildDate><ttl>20</ttl><item><title>Trouble with IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8540.aspx</link><description>I'm attempting to implement IBusinessBindable.  It works great to load the control, but it is not saving the changes. I have the property setup as it should be but it isn't saving changes.  I'm not sure were to look. I copied from the IBusinessBindable example. It seemed pretty straight forward. &lt;br&gt;
&lt;br&gt;
What might I be doing wrong?  :ermm:</description><pubDate>Fri, 27 Apr 2007 13:39:49 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Trouble with IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8564.aspx</link><description>Thanks.  This is being used on an HTML editor control, so I'm not surprised that there might be some problem with it reliably raising the event.  I'll look into it.</description><pubDate>Fri, 27 Apr 2007 13:39:49 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item><item><title>RE: Trouble with IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8555.aspx</link><description>Most likely it's one of 2 things... either the DataSourceUpdateMode is not set to OnPropertyChanged, or the control is not properly raising a PropertyChanged event.&amp;nbsp; &lt;P&gt;If it's a basic control, then make sure on the control that the DataSourceUpdateMode defaults to OnPropertyChanged... otherwise, it might default to OnValidation, which might not always fire.&amp;nbsp; &lt;/P&gt;&lt;P&gt;If it's a custom control, then you'll need to either create a &amp;lt;PropertyName&amp;gt;Changed event (i.e. if your property is "Value" then you need an event called "ValueChanged") that is of type EventHandler or implement the INotifyPropertyChanged interface and use the PropertyChanged event.&amp;nbsp; &lt;/P&gt;&lt;P&gt;The easiest if probably the first one (not the INotifyPropertyChanged interface), so create the event for your property.&amp;nbsp; In VB, you have to explicitly set it as type EventHandler, so do this:&lt;/P&gt;&lt;P&gt;Public Event ValueChanged As EventHandler&lt;/P&gt;&lt;P&gt;not:&lt;/P&gt;&lt;P&gt;Public Event ValueChanged(ByVal sender As Object, ByVal e As EventArgs)&lt;/P&gt;&lt;P&gt;Then, raise the event within the Set of the property when the value changes like so: RaiseEvent ValueChanged(Me, EventArgs.Empty)&lt;/P&gt;&lt;P&gt;If you want to use the INotifyPropertyChanged event, then in the Setter of the property you have to raise the PropertyChanged event like this: RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs("Value"))&lt;/P&gt;&lt;P&gt;The whole reason for the changed events is that the data-binding within .NET adds a handler to the changed event so that is knows when to copy the data from the control to the data source.&amp;nbsp; If you don't have the event, then the data never gets copied back.</description><pubDate>Fri, 27 Apr 2007 10:23:16 GMT</pubDate><dc:creator>StrataFrame Team</dc:creator></item><item><title>RE: Trouble with IBusinessBindable</title><link>http://forum.strataframe.net/FindPost8544.aspx</link><description>Ah, more info.  It [i]does[/i] save changes, just not the last change made. I was just making one change, then trying to save it. If I make two, it saves the first, but not the second...</description><pubDate>Thu, 26 Apr 2007 19:49:57 GMT</pubDate><dc:creator>Greg McGuffey</dc:creator></item></channel></rss>