In a asp.net web site I’m using a TreeView to display data from a xml file
this is the TreeView HTML code
<asp:TreeView ID="trvPILDeepSearch" runat="server" ImageSet="Simple" BackColor="#F8F8F8" BorderWidth="5px" BorderColor="#F8F8F8" LeafNodeStyle-CssClass="leafnode" Width="600px" >
<DataBindings>
<asp:TreeNodeBinding DataMember="Parent" TextField="TEXT" SelectAction="None" />
<asp:TreeNodeBinding DataMember="Child" TextField="TEXT" SelectAction="None" />
</DataBindings>
</asp:TreeView>
Now I want to change the text color of the Parent nodes, Is it possible to change the colour only in selected nodes
Name1 <-- Change the color of this
Detail1
Detail2
Name2 <-- Change the color of this
Detail2
Detail2
You can add
RootNodeStylefor the tree view:In .aspx: add the css class to the
RootNodeStyleas below: