Yes you can create a treeview that will display different UI.
Create Treeview tvList

Something like this

string xmlName="HeadLine.xml";

private void CreateTree(String xmlName)
    {

        XmlDocument XmlDoc = new XmlDocument();
        XmlDoc.Load(Server.MapPath("TreeXml\\" + xmlName));

        tvList.Nodes.Clear();
        foreach (XmlNode node in XmlDoc.ChildNodes[0].ChildNodes)
        {
            TreeNode tNode = new TreeNode();
            tNode.Text = node.Attributes["title"].Value;
            tNode.Value = node.Attributes["url"].Value;


            tvList.Nodes.Add(tNode);
        }
    }

Eg of HeadLine.xml

*<xml>*
*      <siteMapNode title="Phono" url="Phono.aspx" description="Phono"/>*
*      <siteMapNode title="Coming Up Next" url="ComingUpNext.aspx"
description="ComingUpNext"/>*
* </xml>*


Easy ....

Pratiksha







On Tue, Jan 5, 2010 at 12:46 AM, Ben <[email protected]> wrote:

> Hi,
>
> Is it possible to create a C# Winform that display a treeview on the
> left hand side and a different UI form/page with textboxes and labels
> for each node on the right hand side? For example, if a user click
> node1, it will show a UI on the right, node2 will show another UI
> design on the right.
>
> How should I go about doing this?
>
> Many thanks and Happy New Year.
>
> Ben
>

Reply via email to