StrataFrame Forum

Custom Field in Sub Classed BO

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

By Terry Bottorff - 12/3/2010

I am trying to add a custom field to my SubClassed BO. But I am not sure how to reference the BO in the following statement (GetType) so that it would be generic?
Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()
        
Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _
         
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("Cowboy_Name"GetType(BBPointsBO))}

    
End Function

TIA.
By Edhy Rijo - 12/3/2010

Hi Terry,

The rule for the BO in the Property Descriptor is to always use the Type of the BO instance where the descriptor is defined. 

So in your sample, if the bo name is BBPointsBO, then that is the one to use.  If you create custom field properties in your base BO then use the name of the base BO.
By Terry Bottorff - 12/3/2010

Got It. Thanks.
It is OK to do what I'm trying to do?
By Edhy Rijo - 12/3/2010

You are welcome.
Terry Bottorff (12/3/2010)
It is OK to do what I'm trying to do?


yes, sure.  You are doing just fine and at the end you all this will just flow naturally and your application will be easier to maintain.
By Terry Bottorff - 12/3/2010

You know when you get my age it is hard to be generic.......!
By Edhy Rijo - 12/3/2010

Terry Bottorff (12/3/2010)
You know when you get my age it is hard to be generic.......!


Hmmmm, could that be the reason I am so into being generic? Blush  I am 45 and counting Wow
By Terry Bottorff - 12/3/2010

That could be. Thank you.