Treeview question

vb6 Lebanon
  • 14 years ago

    How can i know the number of certains nodes and child items.

    like this:


    Building 1

        room 1

    Building 2

       room 3

    Building 3

       room 4

    i want to know the number of buildings alone and the number of rooms alone..

    in 2 seperate variable, i just need the syntax..


  • 14 years ago

    Dear Random

    You can do it like this
     Text1.Text = TreeView1.Nodes.Item(x).Children

    where x stands for the specified item (check the building's item NO or rooms as you like)

    but why don't count your records instead of that to get the number of your building and rooms?


Post a reply

Enter your message below

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++: an octopus made by nailing extra legs onto a dog.” - Steve Taylor