VS.NET - ASP.NET - Handling Treeview display issues

Synopsis:

Microsoft's Treeview Webcontrol has several style properties(selectedstyle, hoverstyle, defaultstyle) that give you some control over the style of treeview nodes when the cursor is above the node. The treeview control also uses filters which it uses on hover,vselection, etc.. which modify the display so that even setting style attributes may not bring about the desired look. Graying,fading, bolding and fuzzy text are often problems. The solution to fix this is rather simple. The filter attribute needs to be set to none.

Solution:

Add this code to the treeview, node or nodetype:
	Dim style as string = "filter: none;" 'add other style settings if wanted
	TreeView1.HoverStyle = New Microsoft.Web.UI.WebControls.CssCollection(style)
	TreeView1.SelectedStyle = New Microsoft.Web.UI.WebControls.CssCollection(style)
	TreeView1.DefaultStyle = New Microsoft.Web.UI.WebControls.CssCollection(style) 
To change the cursor change they style to:
	Dim style as string = "cursor:default;filter: none; " 'add other style settings if wanted
	TreeView1.HoverStyle = New Microsoft.Web.UI.WebControls.CssCollection(style)
	TreeView1.SelectedStyle = New Microsoft.Web.UI.WebControls.CssCollection(style)
	TreeView1.DefaultStyle = New Microsoft.Web.UI.WebControls.CssCollection(style) 
About this page: