Exposing databinding of SF controls within a user control


Author
Message
Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.7K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
What is the best way to expose the data binding of SF controls embedded within a user control?



E.g. a user control that contains several SF textboxes to hold an address: a couple of address lines plus city, state and zip textboxes. When I drop the address user control onto a form, what is the best way to expose the bindings on these five text boxes, so they can be bound via the user control?
Chan
Chan
Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

Currently what I did is, I have put textboxes in a user control which country and states BO as baseclass. Then, I subclass this user control, and place BO such as employeeAddressBO and set data binding. Drop the user control with data binding to form and set BOTranslation.

It is the simplest way I can find at this moment. If you have any better solutions, please advice.

Thank you

Greg McGuffey
Greg McGuffey
Strategic Support Team Member (2.7K reputation)
Group: Forum Members
Posts: 2K, Visits: 6.6K
This seems like a excellent idea if you know what the bindings will be when the control is built (i.e. you know it will bind to an instance of the employeesAddressBO).



The user control I'm currently building is more generic...I have no idea what the binding will be.
Chan
Chan
Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)Advanced StrataFrame User (603 reputation)
Group: Forum Members
Posts: 533, Visits: 2K
Hi,

I used to post similar question here, http://forum.strataframe.net/Topic8396-7-1.aspx

However, I have no time to explore for it yet.

StrataFrame Team
S
StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)StrataFrame Developer (3.5K reputation)
Group: StrataFrame Developers
Posts: 3K, Visits: 2.5K
If you don't know what you'll be binding to, then you'll probably need to add a property to your UserControl to accept a business object.  Then, in the load of the user control, you can configure the bindings manually dependant upon the type of the business object that you set.
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