locked
Treeview Binding with Relationships RRS feed

  • Question

  • I am looking for a tutorial on how to bind an Expression Blend treeview control to XML or a SQL database. Where the data schema looks like this:

    ID

    ParentID

    Name

    And there is a relationship between ParentID and ID. Root TreeNodes have a ParentID of "0".

    Example:

    </Records>

    <Record>

    <ID>1</ID>

    <ParentID>0</ParentID>

    <Name>USA</Name>

    <Record>

    </Record>

    <ID>2</ID>

    <ParentID>1</ParentID>

    <Name>Florida</Name>

    <Record>

    </Record>

    <ID>3</ID>

    <ParentID>2</ParentID>

    <Name>Miami</Name>

    <Record>

    </Record>

    <ID>4</ID>

    <ParentID>0</ParentID>

    <Name>Canada</Name>

    <Record>

    </Record>

    <ID>5</ID>

    <ParentID>4</ParentID>

    <Name>Quebec</Name>

    </Record>

    </Records>

    Thanks in advanced for the help.

    Scott Peal

    Chief IT Architect

    Sunday, March 16, 2008 1:55 PM