Hi Jason,This may help (or not). I recently wanted various versions on the same BO but populated differently and all versions to be available simultaneously so I built a class that contained various infor (including the BO's data table) and stuck these classes into a sorted list. In summary:
In the main form's global area define a sorted list:
Dim slALU As New SortedList
----------
Add a new ALULookup class to the sorted list as needed and passing in the a BO that contains the data I have at this point in time:
slALU.Add(Me.BoGRS1.CurrentRowIndex, New clsALULookup(BO, CType(Me.BoGRS1.GRS_ATTType, Integer), Me.BoGRS1.GRSID.Value))
----------
The ALULookup class has the following properties. Note that one is the Data Table from the BO that is passed in:
Public Class clsALULookup
' A class to provide ALU lookup data for a specific Score cell in a grading screen.
Private _dv As Data.DataView = New System.Data.DataView
Private _dt As Data.DataTable = New System.Data.DataTable
Private _LongestCode As Integer = 0
Private _ShortestCode As Integer = 0
Private _DefGUID As String = ""
Private _DefCode As String = ""
Private _DefName As String = ""
-----------
Then I can extract the specific class I want from the sorted list as and when I need it and use its properties:
Dim clsALU As clsALULookup = CType(slALU.Item(View.FocusedRowHandle), clsALULookup)
If Not clsALU Is Nothing AndAlso clsALU.dv.Count >= 1 Then
clsALU.dv.RowFilter = "PK = '" & CType(View.GetRowCellValue(View.FocusedRowHandle, "GRS_Score"), String) & "'"
If CType(clsALU.dv.Item(0)("ALUReason"), Boolean) Then....
DefaultName = clsALU.DefName .....
-----------
Not strongly typed of course but, in my application, clsALU can contain different 'types' of BO.
Cheers, Peter