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. Visual Basic
  4. how to display categories by tree view in vb.net

how to display categories by tree view in vb.net

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasedata-structuresregex
13 Posts 4 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.
  • M Offline
    M Offline
    Milad Biroonvand
    wrote on last edited by
    #1

    hi every body, how to display categories by tree view i am read my data from database (acesss) my table is : filds: CategoryId - Root - CategoryName 1 0 country 2 1 city 3 2 school 4 3 class 102 5 4 Chair 6 5 leg thank you very match before your ansewer . please hury up ... help

    S M D 3 Replies Last reply
    0
    • M Milad Biroonvand

      hi every body, how to display categories by tree view i am read my data from database (acesss) my table is : filds: CategoryId - Root - CategoryName 1 0 country 2 1 city 3 2 school 4 3 class 102 5 4 Chair 6 5 leg thank you very match before your ansewer . please hury up ... help

      S Offline
      S Offline
      Steven J Jowett
      wrote on last edited by
      #2

      miladbiranvand wrote:

      please hury up

      NO !!!!!

      Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.

      M 2 Replies Last reply
      0
      • S Steven J Jowett

        miladbiranvand wrote:

        please hury up

        NO !!!!!

        Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.

        M Offline
        M Offline
        Milad Biroonvand
        wrote on last edited by
        #3

        why no????????

        1 Reply Last reply
        0
        • S Steven J Jowett

          miladbiranvand wrote:

          please hury up

          NO !!!!!

          Steve Jowett ------------------------- Real programmers don't comment their code. If it was hard to write, it should be hard to read.

          M Offline
          M Offline
          Milad Biroonvand
          wrote on last edited by
          #4

          I have a table in the following format and I want to create a form with a tree view control to display the data to the end user. All the rows with LeafCategory is 0 have children. Leaf category 1 means its last category. i.e not expandable. In the following example category id 20081 is the Main category. A category is considered main category when the CategoryID and CategoryParentId are same. CategoryId 's 37903 and 4707 are children of 20081. 37909, 63516, 37911 are childen of 4707... etc. I don't want to write a sql statmet for each node to find out the childen. I'm looking for a solution with arrays, hash table .. etc. VB.NET CategoryId CategoryLevel CategoryName CategoryParentId LeafCategory ----------- ------------- -------------------------------------------------- ---------------- ------------ 20081 1 Antiques 20081 0 37903 2 Antiquities (Classical, Amer.) 20081 0 4707 2 Architectural & Garden 20081 0 37909 3 Ceiling Tins 4707 1 63516 3 Chandeliers, Fixtures, Sconces 4707 1 37911 3 Hardware 4707 0 37912 4 Door Bells, Knockers 37911 1 37913 4 Hooks & Brackets 37911 1 37914 4 Knobs & Handles 37911 1

          1 Reply Last reply
          0
          • M Milad Biroonvand

            hi every body, how to display categories by tree view i am read my data from database (acesss) my table is : filds: CategoryId - Root - CategoryName 1 0 country 2 1 city 3 2 school 4 3 class 102 5 4 Chair 6 5 leg thank you very match before your ansewer . please hury up ... help

            M Offline
            M Offline
            Milad Biroonvand
            wrote on last edited by
            #5

            pleass this see but in vb.net

            1 Reply Last reply
            0
            • M Milad Biroonvand

              hi every body, how to display categories by tree view i am read my data from database (acesss) my table is : filds: CategoryId - Root - CategoryName 1 0 country 2 1 city 3 2 school 4 3 class 102 5 4 Chair 6 5 leg thank you very match before your ansewer . please hury up ... help

              D Offline
              D Offline
              DaveAuld
              wrote on last edited by
              #6

              Better be quick, your assignment for school must be due on Monday is it? FAIL

              Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

              M 1 Reply Last reply
              0
              • D DaveAuld

                Better be quick, your assignment for school must be due on Monday is it? FAIL

                Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

                M Offline
                M Offline
                Milad Biroonvand
                wrote on last edited by
                #7

                no

                M 1 Reply Last reply
                0
                • M Milad Biroonvand

                  no

                  M Offline
                  M Offline
                  Milad Biroonvand
                  wrote on last edited by
                  #8

                  please help!!!!!!!!!!!!!!!!!!!!!!!!!

                  D 1 Reply Last reply
                  0
                  • M Milad Biroonvand

                    please help!!!!!!!!!!!!!!!!!!!!!!!!!

                    D Offline
                    D Offline
                    DaveAuld
                    wrote on last edited by
                    #9

                    If you want help you are going about it the wrong way. READ THE POSTS AT THE TOP OF THE FORUM - They are easy to understand!

                    Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

                    M 1 Reply Last reply
                    0
                    • D DaveAuld

                      If you want help you are going about it the wrong way. READ THE POSTS AT THE TOP OF THE FORUM - They are easy to understand!

                      Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

                      M Offline
                      M Offline
                      Milad Biroonvand
                      wrote on last edited by
                      #10

                      ok ,now help

                      D L 2 Replies Last reply
                      0
                      • M Milad Biroonvand

                        ok ,now help

                        D Offline
                        D Offline
                        DaveAuld
                        wrote on last edited by
                        #11

                        i think not.

                        Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

                        M 1 Reply Last reply
                        0
                        • D DaveAuld

                          i think not.

                          Dave Who am I?: Web|Facebook|Twitter|LinkedIn|Bebo

                          M Offline
                          M Offline
                          Milad Biroonvand
                          wrote on last edited by
                          #12

                          no problem...

                          1 Reply Last reply
                          0
                          • M Milad Biroonvand

                            ok ,now help

                            L Offline
                            L Offline
                            Lost User
                            wrote on last edited by
                            #13

                            miladbiranvand wrote:

                            ok ,now help

                            Ha, I almost gave a 5 to this for the amount of LOL.

                            Check out the CodeProject forum Guidelines[^] The original soapbox 1.0 is back![^]

                            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