| | |
COUNT items in node sub node, childre, ...ecc...
Please support our Visual Basic 4 / 5 / 6 advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Feb 2008
Posts: 20
Reputation:
Solved Threads: 0
After the treeview is filled is possible to:
count how may AG-xxxxx are in 8501-xxx, count how may items are in each AG-xxxxx, , count how may items are in each SETT. -xx, ....ecc
and store the result in a var
or
count during the treeview is filling and return the result in a var
in effect i want to count how many items are in each node with "+"...
this is my code to fiull treeview:
in this case AREA 8501 contain 68 AG. -xxx
in this case Ag. -0300 contain 17 SETT. -XX
in this case SETT. 00 contain 1 item, in this case SETT. 75 contain 1 item
count how may AG-xxxxx are in 8501-xxx, count how may items are in each AG-xxxxx, , count how may items are in each SETT. -xx, ....ecc
and store the result in a var
or
count during the treeview is filling and return the result in a var
in effect i want to count how many items are in each node with "+"...
this is my code to fiull treeview:
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
RSSQL2.MoveFirst Do Until RSSQL2.EOF sValue = Trim(RSSQL2.Fields("COD_AREA").value) sKey = "K" & sValue .Nodes.Add , , sKey, sValue & " - " & Trim(RSSQL2.Fields("DESCRIZIONE")), 1, 1 sValue = "AG. - " & Trim(RSSQL2.Fields("SPORT").value) 'sSQL = .Nodes.Count .Nodes.Add sKey, tvwChild, "L" & sValue, sValue & " - " & Trim(RSSQL2.Fields("DESCRIZIONE2")), 1, 2 sKey = "L" & sValue sValue = "SETT. - " & Trim(RSSQL2.Fields("PROVA3")) SSQL = .Nodes.Count .Nodes.Add sKey, tvwChild, "M" & sKey & sValue, sValue, 1, 2 sKey = "M" & sKey & sValue sValue = "COPE - " & Trim(RSSQL2.Fields("PROVA1")) .Nodes.Add sKey, tvwChild, "N" & sKey & sValue, sValue, 1, 2 '.Nodes.Item(sKey).EnsureVisible RSSQL2.MoveNext 'sSQL = .Nodes.Count Loop
in this case Ag. -0300 contain 17 SETT. -XX
in this case SETT. 00 contain 1 item, in this case SETT. 75 contain 1 item
Last edited by Ancient Dragon; Jan 18th, 2009 at 3:00 pm. Reason: add coded tags
Hi,
Try This :
Regards
Veena
Try This :
vb Syntax (Toggle Plain Text)
Dim TNode as Node Set TNode = Trvw.Nodes("AG. -0300") 'Note Ag.-300 is the Key of the node MsgBox TNode.Children
Regards
Veena
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Printing a Memo field from MSACCESS
- Next Thread: how to use asterix character (*) in input box
| Thread Tools | Search this Thread |
* 6 429 2007 access activex add age application basic beginner birth bmp calculator cd cells.find click client code college column component connection connectionproblemusingvb6usingoledb copy creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit error excel excelmacro file filename form hardware header iamthwee image inboxinvb internetfiledownload keypress label listbox listview liveperson login looping machine microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading record refresh remotesqlserverdatabase report retrieve save search sendbyte sites sort sql sql2008 sqlserver subroutine tags textbox time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web window windows





