Hi OriginalGriff
Thank you for trying to help me.
I am surprise the I did posted the coding in my original posting. Apparently, the overall coding are too much and it does not display all of it.
Here are the continuation of the coding:
<pre lang="sql">
With Me.TreeViewInvoice
.BeginUpdate()
While (DR.Read())
If (DR.Item("OrderID")<> intOrderID) Then
intNode += 0
intOrderID = DR.Item("OrderID")
' ---- Parent ---OrderID
.Nodes.Add(DR.Item("OrderID"))
Else
'---- Child Level ----Order Date
If (DR.Item("OrderDate").ToString <> DteOrderDate.ToShortDateString) Then
DteOrderDate = Date.Parse(DR.Item("OrderDate").ToString)
'--- Child ---
.Nodes(intNode).Nodes.Add(DR.Item("OrderDate")) ' --child
End If
'---- GrandChild Level ----ProductId
.Nodes(intNode).Nodes(intSubNode).Nodes.Add(DR.Item("ProductID"))
End If
End While
End With
DR.Close()
sqlconn.Close()
sqlcmd.Dispose()