Type | Description | |||
Object | An ADO.Recordset or DAO object used bind the group to a data source. |
With ExplorerTree1.Groups.Add("Group 1") Set rs = CreateObject("ADODB.Recordset") rs.Open "Orders", "Provider=Microsoft.Jet.OLEDB.3.51;Data Source= D:\Program Files\Microsoft Visual Studio\VB98\NWIND.MDB", 3 ' Opens the table using static mode .BeginUpdate .ColumnAutoResize = False .HeaderVisible = True Set .DataSource = rs .EndUpdate End With
The DataSource clears the columns collection, and fill the record set into the group, like a list. Use SetParent method to make your list a hierarchy.