I can't seem to find this property for the tree. Is there another way to configure the tree to not render the nodes as HTML anchors?
Hi antiluddite
Did you try to use templates? Setting the ItemTemplate for the WebDataTree, similar to the following fragment, might help you.
...
<ItemTemplate>
<img src="images/folder.gif" alt=""/>
<span><%# DataBinder.Eval(Container.DataItem, "Name") %></span>
</ItemTemplate>
Is there some particular case where rendering Anchor element is not preferable ?
Hope that helps
Christo Djambov
cdjambov,
Thanks, this might work, but I'm not databinding this tree (at least not all of it). The tree is being used in a SharePoint application page in a manner similar to the design-time Nodes editor of the WebDataTree control itself, i.e. users can manually add, edit and delete nodes as in Windows Explorer. Once the hierarchy is complete, the users can save the tree to a database.
My biggest frustration was that modifying the CSS classes for hovering in the tree nodes (.igdt_NodeHover) has no effect since the nodes are rendered as anchors. Whenever I hovered over a node I had the typical link underline. I created a workaround by defining the following CSS class (which references the standard node CSS class) in the application page:
a:hover.igdt_Node{ text-decoration:none; color:#4169E1; /* RoyalBlue */}
Which simply turns off the underline for anchors and sets the text color. I have no need whatsoever to use anchors in the tree nodes for my particular design. The WebDropDown was easier to use because I can configure it via the EnableRenderingAnchors property to skip rendering anchors altogether.
Hi
I suppose hiding the text decoration solved the issue.
If not please elaborate further on it.
Try to see if the the sharepoint css is not overriding the control css.