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
  • 3726
    posted

    Hi Paul,

    to my understanding you are trying to replace the styling of the current theme. All you have to do is to open the webdatatree.css in the ig_res folder and edit the CSS classes inside with your custom styling.

    You can also create a new theme by adding new folder like MyTheme to ig_res and copy the webdatatree.css file and edit it as you like. Then you can specify the theme name by applying it in the stylesetname property. You can edit the specific theme css using the AppStylist application.

    Hope this helps.

     Thanks,

    Lubomir

Reply Children