Group: Forum Members
Posts: 3,
Visits: 22
|
Thanks Greg
Done it and now the form is displaying. However, when I would edit it and select a value it runs into a neverending loop within the set.
Here is the custom property code :
#Region " Custom Field Properties "
''' <summary>
''' sex
''' </summary>
<Browsable(False), _
BusinessFieldDisplayInEditor(), _
Description("Sex Radion button field"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Property [sex_radion]() As System.Int32
Get
Dim loValue As Object
loValue = Me.CurrentRow.Item("sex")
If loValue Is DBNull.Value Then
Return 1
Else
If loValue = "F" Then
Return 2
Else
Return 1
End If
End If
End Get
Set(ByVal value As System.Int32)
If value = 1 Then
Me.CurrentRow.Item("sex") = "M"
Else
Me.CurrentRow.Item("sex") = "F"
End If
End Set
End Property
#End Region
I also added the follwoing:
Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()
'-- Create and return a new array of FieldPropertyDescriptor
' objects that contains the ReflectionPropertyDescriptor
' for the cust_fullname field.
Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor( _
"sex_radion", GetType(AgentBO))}
End Function
|