StrataFrame Forum

How to access field descriptors

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

By Greg McGuffey - 3/13/2008

I can't remember how to access the field descriptor in a BO. How do I do that again?



(Sorry, can't find post were this was shown...:blushSmile



Thanks!
By Trent L. Taylor - 3/13/2008

Are you talking about the GetCustomBindablePropertyDescriptors or creating a field descriptor class...or using reflection to talk to the field descriptor BigGrin ?
By Greg McGuffey - 3/14/2008

I'm talking about getting the value of the Description attribute that is defined for a field, marked with "<---- THIS PUPPY" in the code sample below:



''' <summary>

''' Requirement Key

''' </summary>

''' <remarks></remarks>

<Browsable(False), _

BusinessFieldDisplayInEditor(), _

Description("Requirement Key"), _ <---- THIS PUPPY

DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _

Public Property [RequirementKey]() As System.Int32

Get

Return CType(Me.CurrentRow.Item("RequirementKey"), System.Int32)

End Get

Set(ByVal value As System.Int32)

Me.CurrentRow.Item("RequirementKey") = value

End Set

End Property
By Trent L. Taylor - 3/14/2008

Good description Smile  I definitely got it this time.  It is actually a method on the BO called GetFieldDescription:

Me.GetFieldDescription("RequirementKey")
By Greg McGuffey - 3/14/2008

LOL...that was hard! Satisfied



Thanks!
By Trent L. Taylor - 3/14/2008

No worries...Smile