Whoa, thats more complicated than I want to get.
Now I've changed the gridview to accept the datatable but it isn't grouping the items at all.
Dim fields As New ResultsetFields(3)
fields.DefineField(TypesFields.Id, 0)
fields.DefineField(TypesFields.Name, 1)
fields.DefineField(TypesFields.ParentId, 2)
Dim groupByClause As IGroupByCollection = New GroupByCollection()
groupByClause.Add(fields(2))
groupByClause.Add(fields(0))
groupByClause.Add(fields(1))
Dim dynamicList As New Data.DataTable()
Dim dao As New TypedListDAO()
dao.GetMultiAsDataTable(fields, dynamicList, 0, Nothing, Nothing, Nothing, True, groupByClause, Nothing, 0, 0)
The lsiting should be grouped by the parentId. it is a list of categories and their parent categories.
Here is a small sample of the list:
Category --- Parent
Client --- Top Level
Individual --- Client
Dependant --- Individual
Spouse --- Individual
Trust --- Client
Company --- Client
Close Corporation --- Client
Classification --- Top Level
Client --- Classification
Other --- Classification
Contact Log --- Top Level
Meeting --- Contact Log
Telephone Call --- Contact Log
Letter or Fax --- Contact Log
Email --- Contact Log