views:

921

answers:

2

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.

+1  A: 

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.

A: 

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.

CodeRot