Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
How do I display my parent child data structure in a treeview? I would like to use the sqlHierarchyId.

Below is a sample of the class Objects and the end result that we would like to display.

VB
Public Class PageEntry

    Private _id As Guid    
    Public Property Id() As Guid
        Get        Set
    End Property

    Private _lineEntries As LineEntries
    Public ReadOnly Property LineEntries() As LineEntries
        Get       Set
    End Property
End Class


Public Class LineEntry 
    Private _id As Guid
    Public Property Id() As Guid
        Get        Set
    End Property

   Private _pageEntryid As Guid
   Public Property PageEntryId() As Guid
       Get        Set
   End Property
   Private _lineNode As Guid
   Public Property LineNode() As SqlHierarchyId
       Get        Set
   End Property

   Private _account As Account
    Public ReadOnly Property Account() As Account
        Get        
    End Property
    ...
End Class

Public Class LineEntries( Of LineEntries, LineEntry)



Treeview display:

PageEntry
    LineEntry 1
    LineEntry 2
    LineEntry 3
        LineEntry 4
            LineEntry 5
Posted
Updated 29-Sep-11 0:45am
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900