Hi!
I have a problem with treeView1!
I try to add url to treeView1,but i don't know how!
I make a Online TV. (Windows media player)
For example: (treeView1)

Germany
kanal1
kanal2
kanal3

Then click to kanal1 And when it opened!
Can you help me?

Recommended Answers

All 5 Replies

I use someting like this! :) But working only one child,but i have a 5!

private void treeView1_AfterSelect(object sender, TreeViewEventArgs e)
        {
            axWindowsMediaPlayer1.URL= "http://www.blablabla.asx";
          }
       }
   }

instead of coding you can use sitemapdatasource to fill your treeview with links.

Your English is a little hard to understand, but I will assume you need to "read" a node of the treeview after it is clicked.
Use the NodeMouseClick event for that:

private void treeView1_NodeMouseClick(object sender, TreeNodeMouseClickEventArgs e)
{
    TreeNode selectedNode = e.Node;
    MessageBox.Show(selectedNode.Text);
}

Once you have the node thisway you can do many things with it, find out if it has children etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.