StrataFrame Forum

Custom field property with BusinessBindingSource

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

By Andria Jensen - 9/7/2006

I have created two custom field properties on a BO and set this BO to my BusinessBindingSource BO.  I set the DataSource for my grid to the BindingSource and two of the column's FieldName properties are set to my custom fields.  These fields are not showing up in the grid, but all other properties are.  The custom properties show as blanks.  Is there something else I need to do?
By StrataFrame Team - 9/8/2006

Did you override the GetCustomBindablePropertyDescriptors() method within the business object?
By Andria Jensen - 9/8/2006

Nope, here's what I did for each one.  I was just following the documentation on adding custom fields.  What else do I need to do? 

<Browsable(False), BusinessFieldDisplayInEditor(), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public ReadOnly Property [DebtorName]() As System.String
 
Get
 
Return Me.ExecuteScalar("SELECT Name FROM Debtors WHERE DebtorKey=" & DebtorKey) 
  End
Get
End Property

By StrataFrame Team - 9/8/2006

You need to override the GetCustomBindablePropertyDescriptors() method like this:

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

By Andria Jensen - 9/8/2006

Ok, that got it.  Thanks Smile
By StrataFrame Team - 9/8/2006

Good to hear Smile