Create user control


Author
Message
kkchan
kkchan
StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

I would like to create an user control that contains of address, city, country, postal and state. I have business object in this user control that would populate country list and bind to combobox.



After create ths user control, I would like to allow user to bind data to user control's inner controls (textbox and combobox) in form.



How to implement this?



Thank you
kkchan
kkchan
StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)StrataFrame Beginner (48 reputation)
Group: Forum Members
Posts: 48, Visits: 97
Hi,

I checked out IBusinessBindable sample, and implemented some code to my user control.

I think the remaining question is, since my user control contains multiple controls. Do you recommend to set all of the relevant properties value to these controls in setter method? Any better place to me to set them only once upon refresh or other event?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You are going down the wong road here.  You need to create your user control based off of the StrataFrame User Control.  This control allows the control to behave just like a form.  Then when dropped on a form, it has a property called BO Translations that allow the forms BO to be used in place of the internal BO in 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,

I have a master table, called currency. I have more than one table FK refer to currency master table, how could I set data binding to controls inside my user control? Which BO should I used for translation? Create dummy BO or...?



Thank you
Trent Taylor
Trent Taylor
StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)StrataFrame Developer (8.5K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
If you are worried about the other tables recognizing the translation, they will.  The object reference is truly changed when the translation takes place.  The SF user control has a property named BOTranslations that allows you to drop the user control on a form and then have the BO on the form translated into the user control. 

So any other BOs that reference the BO on the parent or within the child will be looking at the same business object specified in the "source" translation BO.

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