LetsGoPens
New member
- Joined
- Apr 18, 2008
- Messages
- 4
- Programming Experience
- 1-3
I have a TreeView that is being populated from a query. The last(leaf) and second to last (node) levels of tree can be URL links depending on the result of a separate query.
I would like the nodes and leaves that have URL links to appear differently than the ones that do not have a link. I tried to manipute the TreeView.LeafNodeStyle for each Leaf, but it is setting it for the entire class. Specifically I want to change the color and underlining for links vs. nonlinks.
Any thoughts on this?
Thanks,
I would like the nodes and leaves that have URL links to appear differently than the ones that do not have a link. I tried to manipute the TreeView.LeafNodeStyle for each Leaf, but it is setting it for the entire class. Specifically I want to change the color and underlining for links vs. nonlinks.
VB.NET:
If dt2.Rows.Count < 1 Then
tn.PopulateOnDemand = False
If dt3.Rows.Count < 1 Then
tn.SelectAction = TreeNodeSelectAction.None
tn.ToolTip = "No data available for this leaf"
'TreeView1.LeafNodeStyle.Font.Underline = False
Else
tn.SelectAction = TreeNodeSelectAction.Select
tn.NavigateUrl = "some URL"
End If
Else
tn.PopulateOnDemand = True
If dt3.Rows.Count < 1 Then
tn.SelectAction = TreeNodeSelectAction.Expand
tn.ToolTip = "No data available for this Node"
'TreeView1.LeafNodeStyle.Font.Underline = False
Else
tn.SelectAction = TreeNodeSelectAction.SelectExpand
tn.NavigateUrl = "some URL "
tn.ToolTip = "Click to view the Report for this Node"
End If
End If
Any thoughts on this?
Thanks,
Last edited by a moderator: