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. get folder path in a treenode ?

get folder path in a treenode ?

Scheduled Pinned Locked Moved C#
questiondatabasetutorial
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.
  • C Offline
    C Offline
    CiNN
    wrote on last edited by
    #1

    i'm trying a treefolder and i've got some probleme retrieving from which drive comes a treenode.fullpath. lets say i've got a node like this -my computer - drive C - folder 1a - folder2 - folder 1b - drive D - folder 4c - folder 3 when i get a fullpath i've got my computer\drive C\folder 1a\folder2 so i get only the "\folder 1a\folder2" part then i dont know how to determine that drive C is "C:\" i thought of getting the index of drive C and map it in the getlogicaldrive list but how do i get the drive C index when i'm in folder2 node ?!

    C 1 Reply Last reply
    0
    • C CiNN

      i'm trying a treefolder and i've got some probleme retrieving from which drive comes a treenode.fullpath. lets say i've got a node like this -my computer - drive C - folder 1a - folder2 - folder 1b - drive D - folder 4c - folder 3 when i get a fullpath i've got my computer\drive C\folder 1a\folder2 so i get only the "\folder 1a\folder2" part then i dont know how to determine that drive C is "C:\" i thought of getting the index of drive C and map it in the getlogicaldrive list but how do i get the drive C index when i'm in folder2 node ?!

      C Offline
      C Offline
      codeprojectin
      wrote on last edited by
      #2

      Use the tag property while loading the treeview and get the link from it.

      C 1 Reply Last reply
      0
      • C codeprojectin

        Use the tag property while loading the treeview and get the link from it.

        C Offline
        C Offline
        CiNN
        wrote on last edited by
        #3

        well the fact is that the drive is embedded in the tag but since i've got a root node i can't happend to get it i use the selectnode then i'm stuck to find the level 2 node which happens to have the drive path in its tag. root - drive 0 (tag = c: ) - node 1 . - drive 1 (tag = d: ) - node 2 - nod3 -nod4 <- selected node nodes[0].nodes ...?

        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