Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. checking the children of a node in a TreeView

checking the children of a node in a TreeView

Scheduled Pinned Locked Moved C#
questionhelp
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    se99ts
    wrote on last edited by
    #1

    i have a standard treeview control with checkboxes, how can i check all the children of a node when the parent is checked? i already have events for before and after check so i assume it must go in there but the problem i have is finding which node is selected as a node doesn't have to be selected for it to be checked. Does anyone have any ideas as its really starting to annoy me as i know it must be so simple :( Thanks

    S P 2 Replies Last reply
    0
    • S se99ts

      i have a standard treeview control with checkboxes, how can i check all the children of a node when the parent is checked? i already have events for before and after check so i assume it must go in there but the problem i have is finding which node is selected as a node doesn't have to be selected for it to be checked. Does anyone have any ideas as its really starting to annoy me as i know it must be so simple :( Thanks

      S Offline
      S Offline
      se99ts
      wrote on last edited by
      #2

      fixed it, i use e.Node to get the children and as its in the event afterCheck, it acts recursively to check all the children!

      1 Reply Last reply
      0
      • S se99ts

        i have a standard treeview control with checkboxes, how can i check all the children of a node when the parent is checked? i already have events for before and after check so i assume it must go in there but the problem i have is finding which node is selected as a node doesn't have to be selected for it to be checked. Does anyone have any ideas as its really starting to annoy me as i know it must be so simple :( Thanks

        P Offline
        P Offline
        Paresh Gheewala
        wrote on last edited by
        #3

        check this TreeView, by recursion you can check anything you want ;):-D http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=b650f7fb-147d-4326-8d83-cb51d89a4ca5

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups