Treeview Control


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Treeview Control

  1. #1
    Join Date
    Nov 2008
    Posts
    10

    Treeview Control

    I have an application where I am populating treeview controls with data indicating whether nodes have been checked previously by the user. When loading the control I would like to expand nodes that are already checked. Is there a property or method that I can use to do that? Thanks in advance for any assistance.

  2. #2
    Join Date
    Feb 2004
    Location
    Longueuil, Québec
    Posts
    577
    There is a Tag property on all the controls, including the TreeNode, that you can use for whatever you want. Simply use it as a flag.

    While you are loading the treeview with your data, put True in that property for the nodes that have been checked previously.

    Once all the data is there, loop through the nodes and Expand those that have True in their Tag property.
    Jacques Bourgeois
    JBFI
    http://www3.sympatico.ca/jbfi/homeus.htm

Similar Threads

  1. Replies: 0
    Last Post: 12-18-2008, 05:18 PM
  2. Load tab control using treeview childnode
    By crystalelle in forum .NET
    Replies: 11
    Last Post: 02-22-2008, 03:55 AM
  3. Replies: 14
    Last Post: 02-13-2008, 06:02 AM
  4. Treeview control does not render
    By tantrik25 in forum ASP.NET
    Replies: 0
    Last Post: 07-24-2006, 10:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center