StrataFrame Forum

How fill the Custom Property of an Business object from another table.

http://forum.strataframe.net/Topic13183.aspx

By Ertan Deniz - 12/27/2007

A Business Object is binded to a DB Table. I want to extend my business objects with custom fields (Which are not based on the fields of the table). How these custom fields will be populated ?

I ll write a special fill method that queries from two or three tables with joined each other. I have the columns which includes my custom values (from DB).

What is the easiest way to transfer or populate this values to my custom properties of my Business Object ?

By Greg McGuffey - 12/28/2007

You'd use custom field properties. See the "Adding Custom Field Properties" topic in the help file to see what is required (it's pretty easy). These allow your custom properties to be bound to controls, just like regular BO field properties. Note that to enable binding you need to create the property with the correct attributes AND include a field descriptor property. A good post on how to properly do this is:



http://forum.strataframe.net/FindPost13027.aspx



In order to access the data that you are querying, you'd just access the appropriate row in the DataTable, by column name within the custom field properties.