Tuesday, February 8, 2011

ASPNET TreeView Expanded Node Style

Does anyone know how in ASP.Net's TreeView control, to have a custom style applied to an Expanded node? I have many root nodes and want the Expanded nodes to have a different background.

  • There is no way of doing this with out of the box controls and this goes for alot of MS ASP.NET controls, however there is an adapters project on codeplex that makes your ASP.NET controls CSS-friendly:
    http://www.codeplex.com/cssfriendly
    Its pretty straight forward but ask again if you need any help setting it up.

    From
  • I didn't want to deviate from the original control, so I ended up writing some JavaScript that would modify the tree via node structures on page load.

    From CodeRot

0 comments:

Post a Comment