Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6968459
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T16:27:16+00:00 2026-05-27T16:27:16+00:00

In a asp.net web site I’m using a TreeView to display data from a

  • 0

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
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T16:27:17+00:00Added an answer on May 27, 2026 at 4:27 pm

    You can add RootNodeStyle for the tree view:

    /* Styles: put this at style section or at your .css file */
    .rootNodeLinkStyle a:link
    {
        color: Red;
    }
    
    .rootNodeLinkStyle a:hover
    {
        color: pink;
        text-decoration:underline;
    }
    

    In .aspx: add the css class to the RootNodeStyle as below:

    <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>
        <RootNodeStyle CssClass="rootNodeLinkStyle" />
    </asp:TreeView>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I debug my ASP.NET web site code using the Microsoft debug symbol's for
I have an Asp.Net web site (there is no .csproj file). This web site's
I am using asp.net web site administration tool to manage the different roles in
I've a asp.net web solution which references a web service from another web site
Very often when working on an ASP.NET web site, the options View Code and
I have an ASP.Net web site deployed in IIS 7.5 with a file Cart.svc
I'm building a asp.net web site i build a class localiziedpage that inherit from
An ASP.NET Web Site raises randomly this System.Drawing-error: System.Runtime.InteropServices.ExternalException: System.Drawing.Bitmap..ctor(Stream stream) System.Drawing.ToolboxBitmapAttribute..cctor() Exception information:
I have an ASP.net Web Site Project (.net 3.5). Currently all of the non-code
I am developing an asp.net web site and I am not using inbuilt authentication

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.