Changing color on a ChildNode in a treeview

Posted on 2012-08-16
Last Modified: 2012-08-25
I have a dynamic treeview that I'm populating from a database.
there are over 200 items with child/grandchild/great grandchild/etc.. nodes in them.
I need to change the fore color of certain nodes and all the child/grandchild/great grandchild/etc for that root node.

I'm currently using  VB ASP .Net
Question by:ECRAdmin
    LVL 96

    Expert Comment

    by:Bob Learned
    If you need to change the style of selected TreeNode elements, then I would suggest applying different CSS style rules.
    LVL 18

    Expert Comment

    by:Rajar Ahmed
    can u post Sample code to work directly on the issue

    Accepted Solution

    i figured it out on my own.  I took the value of each of the parent nodes and put them into an array and then put that array through a loop and tested it again each of the items.  if the value of that parent and child of that parent matched i changed the color using HTML code instead.

    Author Closing Comment

    because no-one could help me and i had to figure it out on my own.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    User art_snob ( encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.
    Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now