How to get changes to a property on a control to update BO when using IBusinessBindable


How to get changes to a property on a control to update BO when using...
Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (3.3K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
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:



' The property that can be bound via SF

Private _myProperty As Integer

Public Property MyProperty() As Integer

Get

Return _myProperty

End Get

Set(value As Integer)

_myProperty = value

Me.OnMyPropertyChanged()

End Set

End Property



' The event that occurs after the property is changed

Public Event MyPropertyChanged As EventHandler

Protected Overridable Sub OnMyPropertyChanged(e As EventArgs)

Raiseevent MyPropertyChanged(Me,e)

End Sub




However, this didn't work. Sad



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.



How do I get the BO to know when the property changes, so it updates itself with the new data?
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search