Norton,
I thought that this newsgroup was filled with recursive samples about this
problem. I saw it is not so it is a nice sample to make for our newsgroup
one of these days. (Not today anymore for that it is to late now.
Basicly you have to do it recursive. Create a method that you use to call
itself as long as that not everything is done. A treeview exist from nodes
which hold nodes etc etc.
(I give you a sample on our website from recursive, be aware this is not
about a treeview that I could not find for VB.Net).
http://www.vb-tips.com/dbpages.aspx?...f-c9d54e1a8d9e
I hope this helps something,
Cor
"Norton Who" <No********@gmail.comschreef in bericht
news:11**********************@c51g2000cwc.googlegr oups.com...
Hi,
Could I please ask if anyone could help me solve this problem in
VS2003:
I'm trying to count all the nodes that have a Checked state however
this doesn't seem to be working for me.
So here is the code:
Dim prCount As Integer 'parent checked count
Dim chCount As Integer 'child checked count
Dim tn As New TreeNode
For Each tn In Me.TreeView_db.Nodes
If tn.Tag = "Column" Then
If tn.Checked = True Then
chCount = chCount + 1
End If
ElseIf tn.Tag = "Table" Then
If tn.Checked = True Then
prCount = prCount + 1
End If
End If
Next tn
This is not giving me the right count, actually it's giving me zero
always.
Thank You,
Norton Who