Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Elad Lachmi 112 posts 144 karma points
    Jan 17, 2012 @ 03:26
    Elad Lachmi
    0

    Style different tree nodes

    Hi,

    I have a custom section in Umbraco with a tree built with some custom logic.

    Everything works great. My only issue is that now I have a requirment to set the text color of the node according to some business logic. Is there a way to do this? I could not find something in node object itself. It does have a style property, but it's readonly, as far as I can tell.

     

    Thank you!

  • Rodion Novoselov 694 posts 859 karma points
    Jan 17, 2012 @ 12:33
    Rodion Novoselov
    0

    Hi. I suppose you can make use of the BaseTree.BeforeNodeRender event and set the XmlTreeNode.Style property depending on the node in your event handler.

  • Jeroen Breuer 4908 posts 12265 karma points MVP 4x admin c-trib
    Jan 17, 2012 @ 12:37
    Jeroen Breuer
    0

    Have a look at the source of the Multi Node Tree Picker. There the color of the nodes is also changed sometimes. There it's done with javascript.

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft