StrataFrame Forum
Home      Members   Calendar   Who's On
Welcome Guest ( Login | Register )
      



Binding controls to business objects at...Expand / Collapse
Author
Message
Posted 02/08/2008 5:56:10 PM
StrataFrame Beginner

StrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame BeginnerStrataFrame Beginner

Group: StrataFrame Users
Last Login: 10/10/2008 11:38:00 AM
Posts: 20, Visits: 82
I'm running into an area where we need to bind the strataframe controls to business objects at runtime.  So far it doesn't seem to work at all, but I admit I might be doing it wrong.

Here's the situation.  We have a meta-table of services received by clients that contains all the services they receive, but only core elements of this information.  Then each category of service has it's own table which contains all the elements for the service.  When creating lists, the meta-table (we refer to it as an intersection table actually) as ALL records for all service categories are contained, so we can show ALL services received.  But when editing we edit the parent table, and then mirror any changes to fields also contained in the meta/intersection table from the parent on save.  We want to use the same webform for most of the service types, and this works fine if I manually bind the data over (manually put the data into the control and manually read it on saves, but if I try setting the business object properties at runtime they don't seem to work.  I can work with this ok, but I would prefer to let the framework do all the work rather than me.  It would be far easier if I could just set the properties on initial load of the form and let everything else happen automagically.  Is this possible?  And if so, what am I likely to be doing wrong?

PS: some portions of the form we add controls to dynamically, so that depending on the parent organization and the service category the overview part of the form is standardized, but the detail portion is defined within the system.  This part is working fine, it's just the dynamic binding I seem to be having trouble with.

Post #14228
Posted 02/09/2008 11:53:25 AM


StrataFrame Developer

StrataFrame Developer

Group: StrataFrame Developers
Last Login: Today @ 4:52:53 AM
Posts: 4,586, Visits: 4,571
The reason you are having an issue is because the standard SF data binding has already taken place, so I assume that you are just setting the BindingField and BindingBusinessOBject properties after the form has already loaded.  If you want to do this, you need to override the OnLoad method of the form and before you call the MyBase.OnLoad() method, set all of your binding logic.  This is also assuming that you want to use SF data binding.  The second option is to manually create a binding and bind the control to the SF BO property.  Either way will work, but you are fighting instantiation order at the moment.
Post #14239
« Prev Topic | Next Topic »


Reading This TopicExpand / Collapse
Active Users: 0 (0 guests, 0 members, 0 anonymous members)
No members currently viewing this topic.
Forum Moderators: Ben Chase, Trent L. Taylor, Steve L. Taylor

PermissionsExpand / Collapse

All times are GMT -6:00, Time now is 8:08am

Powered by InstantForum.NET v4.1.4 © 2008
Execution: 0.031. 7 queries. Compression Enabled.
Site Map - Home - My Account - Forum - About Us - Contact Us - Try It - Buy It

Microsoft, Visual Studio, and the Visual Studio logo are trademarks or registered trademarks of Microsoft Corporation in the United States and/or other countries.