WebTreeView Cursor Issue

2 replies. Last post: January 5, 2011 12:45 AM by Frank Bruce
Tags :
Frank BruceMember

  I only want to Set selectNode's Cursor(Not all the nodes).Please see the picture below.

 <NodeStyle   Over-Cursor="Hand" Active-Cursor="Hand"  Normal-Font-Size="X-Small" Over-Font-Size="X-Small"  Active-Font-Size="X-Small" />  (this way can not meet my need)
How can I do???                  

1 attachment

Answers

Martin LieSupport

Hello,

You can use InitializeNode Server-side event to implement the following code:

protected void WebTreeView1_InitializeNode(object sender, ISNet.WebUI.WebTreeView.WebTreeViewNodeEventArgs e)
{
   if (e.Node.Text == "WebGrid.NET 3.5")
   {
      e.Node.CustomStyle = "cursor: hand;";
   }
}

Attached is the sample for your reference.

Hope this helps.

 

Thank you.

All Replies

Martin LieSupport

Hello,

You can use InitializeNode Server-side event to implement the following code:

protected void WebTreeView1_InitializeNode(object sender, ISNet.WebUI.WebTreeView.WebTreeViewNodeEventArgs e)
{
   if (e.Node.Text == "WebGrid.NET 3.5")
   {
      e.Node.CustomStyle = "cursor: hand;";
   }
}

Attached is the sample for your reference.

Hope this helps.

 

Thank you.

thank you,Martin Lie,

I  think of a way by your code :

   if (e.Node.Depth == 2)
        {

            e.Node.CustomStyle = "cursor: hand;";
       
        }

 

All times are GMT -5. The time now is 7:07 AM.
Previous Next