Hi guys,
I had a problem with the TreeView.

I needed to change the text in bold of the clicked TreeView's leaves, without using Themes.

I found a workaround as follows:

        protected void Page_Init(object sender, EventArgs e)
        {
            string selectedLeaf = string.Empty;
            if (Request.QueryString.Get("Report") != null)
                selectedLeaf = Request.QueryString.Get("Report");

            foreach (TreeNode tn in trvMenuControlli.Nodes[0].ChildNodes)
            {
                if (tn.NavigateUrl.Substring(tn.NavigateUrl.LastIndexOf("=") + 1) == selectedLeaf)
                {
                    tn.Text = "<b>" + tn.Text + "</b>";
                    break;
                }
            }
        }

The leaves are static specified on the aspx page.

Enjoy.

Tags: