OK, Thanks very much for the sample. Still got a problem though.
This is what I allready had:
Dim _ZipCode As String = ""
'''
''' Zip Code
''' _ZipCode
'''
BusinessFieldDisplayInEditor(), _
Description("Zip Code"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Property [ZipCode_cust]() As String
Get
Return _ZipCode
End Get
Set(ByVal value As String)
_ZipCode = value
End Set
End Property
I allready had the call to validate:
Private Sub CCBO_CheckRulesOnCurrentRow(ByVal e As MicroFour.StrataFrame.Business.CheckRulesEventArgs)
'--Validate zip code
If Len(Me.ZipCode_cust.Trim) > 0 Then
If Me.ZipCodeCheck(Me.ZipCode_cust.Trim) = False Then
Me.AddBrokenRule("zipcode_cust", "The Zip Code format in invalid.")
End If
End If
End Sub
I added what you had in your business object:
Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()
Return New FieldPropertyDescriptor() {New ReflectionPropertyDescriptor("ZipCode_cust", GetType(AES_PPM_BOL.CCBO))}
End Function
The code for the field on the web page is as follows:
Finally in the application base page I also had the following:
Private Sub Page_PreRender1(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreRender
Me.ErrorIcon = "images/brokenrule.gif"
End Sub
Eventhough the error line shows up, which it had from the beginning, the Brokenrule.gif doesn't show up at end of textbox when I do custom validation. It only shows up when the required field is empty (on same textbox). Am I missing something else?