Are there some samples for using such a structure? Recommendations?
This is a pretty common task...in fact, even as I stopped to write this post I was writing a maintenance form that has a tree structure. From what I can tell, you may want to incorporate several things. First, you would want to create a Enum that represents the type of record. Enums are great tools and you can see how to strong-type this value on your BO in the CRM Sample and the Customers BO. There is a field called cust_PhoneDatType and cust_PhoneNightType. This will show you how to strong-type a BO field property as an Enum...this is also shown in a number of other posts and in the help docs.
Next, you would have a foreign key field that points back to itself. For example:
Public Enum MyNodes As Integer
Folder = 0
Report = 1
SubReport = 2
End Enum
Then your data structures may look like this:
Category Table
cat_pk - Integer - Primary Key
cat_cat_Parent - Foreign key back to this table for a child item. Leave zero for a parent record.
cat_Type - Integer (Assign the MyNodes Enum to this value in the BO Mapper)
cat_Name - VarChar - The name of the category
At thsi point, just create your BO, map it to your structures and then add a customization to the cat_Type field for your MyNodes enum as mentioned above. Then you will create a fill method to property order these records and then load a tree view. That should really be about it. 