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?

    Regards
    DoctorMahdi

Post a reply

Enter your message below

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

Contribute

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.

“Owning a computer without programming is like having a kitchen and using only the microwave oven” - Charles Petzold