WebTreeView CustomStyle

8 replies. Last post: January 17, 2011 12:55 PM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback
Frank BruceMember

Can I custom the node's style,like this:when I onmouseover,the node color is red,when I onmouseout ,the node color is blue.(see the picture below)
Any way, my code does not work.

How can I do ??Anyone can help me ?Thanks 

 <ISWebTreeView:WebTreeView ID="Tree_left" runat="server" Height="365px" Width="156px"                    DataSourceID="XmlDataSource1" AutoGenerateDataBindings="True"          OnInitializeNode="Tree_left_InitializeNode">

  protected void Tree_left_InitializeNode(object sender, WebTreeViewNodeEventArgs e)
    {       
        if (e.Node.Depth == 2)
        {
            //e.Node.CustomStyle = "cursor: hand;border-bottom:1px solid #0000CC;vertical-align:bottom;color:#0000CC;";
            e.Node.Text ="<u onmouseover=\"this.style.color='red'\" onmouseout=\"this.style.color='#0000CC'\" >"+e.Node.Text+" </u>";
          
        }
    }
1 attachment
All times are GMT -5. The time now is 11:28 AM.
Previous Next