Hey Bill.
Just in case it might help you see what Trent told you about adding a new field to your table and filtering on it, here is some code of mine where I do exactly the same, filtering on a field that doesn't exist on the underlying table.
On your BO:
Private Sub MyBO_CurrentDataTableRefilled() Handles MyBase.CurrentDataTableRefilled
If Me.CurrentDataTable.Columns.Contains("myField") = False Then
Me.CurrentDataTable.Columns.Add("myField", System.Type.GetType("System.Boolean"))
End If
End Sub
Private Sub MyBO_CurrentDataTableInitialized() Handles MyBase.CurrentDataTableInitialized
If Me.CurrentDataTable.Columns.Contains("myField") = False Then
Me.CurrentDataTable.Columns.Add("myField", System.Type.GetType("System.Boolean"))
End If
End Sub
And, of course, the property:
<Browsable(False), _
BusinessFieldDisplayInEditor(), _
Description("My property"), _
DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)> _
Public Property [myFieldProperty]() As Boolean
Get
Dim loValue As Object
loValue = Me.CurrentRow.Item("myField")
If loValue Is DBNull.Value Then
Return False
Else
Return CBool(Me.CurrentRow.Item("myField"))
End If
End Get
Set(ByVal value As Boolean)
Me.CurrentRow.Item("myField") = value
End Set
End Property
Protected Overrides Function GetCustomBindablePropertyDescriptors() As MicroFour.StrataFrame.Business.FieldPropertyDescriptor()
'-- Create and return a new array of FieldPropertyDescriptor
' objects that contains the ReflectionPropertyDescriptor
' for the cas_Idade field.
Return New MicroFour.StrataFrame.Business.FieldPropertyDescriptor() { _
New MicroFour.StrataFrame.Business.ReflectionPropertyDescriptor("myFieldProperty", GetType(MyBO))}
End Function
So, now, on my logic, after setting my field depending on conditions:
'-- applies the filter
Me.MyBO1.Filter = "myField = True"
Hope it helps in some way...