Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1360
How to Specify Tree Node Style Clientside
posted

I have built (loaded data into) a WebDataTree suing JavaScript but I cannot find a way of formatting the Nodes using CSS. I have tried the following:

Overwriting the node properties immediately after a node is created:

 

 

 

 

function setTreeClasses(tree, CssClassName) {
tree._ActiveCssClass = CssClassName;
tree._DisabledCssClass = CssClassName;
tree._GroupCssClass = CssClassName;
tree._HoverCssClass = CssClassName;
tree._nodeCssClass = CssClassName;
tree._ParentCssClass = CssClassName;
tree._RootCssClass = CssClassName;
tree._SelectedCssClass = CssClassName;
tree._nodeActiveCssClass = CssClassName;
tree._nodeDisabledCssClass = CssClassName;
tree._nodeGroupCssClass = CssClassName;
tree._nodeHoverCssClass = CssClassName;
tree._nodeParentCssClass = CssClassName;
tree._nodeRootCssClass = CssClassName;
tree._nodeSelectedCssClass = CssClassName;
tree._controlActiveCssClass = CssClassName;
tree.controlStylePrefix =
"";
}

I have also intercepted the node Added and Adding events and tried to explicitly set CssClass there.

The problem seems to be that there are no (documented) properties or methods for setting the node CssClass, only methods for setting the hover and selected node styles.

Any help gratefully received.

Paul Shearing

VS 2010
IG 10.3 WebDataTree
CLR 4.0

 

Parents Reply Children
No Data