Sync new BO record to form controls


Author
Message
Andria Jensen
Andria Jensen
Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)Advanced StrataFrame User (600 reputation)
Group: Forum Members
Posts: 336, Visits: 497
I have a form with a bunch of controls bound to my BO.  I want to be able to call a .Add and then sync the BO with the controls as they are on the form when the .Add is called.  Is there a way for me to do this currently?  Right now, it just sets everything to defaults when I call an Add.  In this case I want it to take on the values of the current bound control settings.
Reply
StrataFrame Team
S
StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)StrataFrame Developer (6.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
There are two options for this:  you can forego the binding completely and just copy the data back and forth between the business object and the control whenever you need to move the data, or, you can set both the ControlSourceUpdateMode and the DataSourceUpdateMode to Never and use a reference to the binding object to push and pull the data whenever you want to move it, like this:

Me.myTextBox.DataBindings(0).ReadValue

Me.myTextBox.DataBindings(0).WriteValue

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