以下是引用woodiy在2009-2-13 16:13:00的发言:
好的,知道了,希望增加此功能!谢谢!
'''
Dim T1,T2,T As String
Dim tr As WinForm.TreeView
Dim nd As WinForm.TreeNode
Dim Da As DataTable = DataTables("订单")
tr =e.Form.Controls("TreeView1")
for Each T1 in Da.GetComboListString("客户").split("|")
nd = Tr.Nodes.Add(T1,T1)
for Each dr As DataRow in Da.Select("客户 ='" & T1 & "'")
T2 = format(dr("日期"),"yyyy年M月")
if T = Nothing orelse T.Indexof(T2) = -1 Then
nd.Nodes.Add(T2,T2)
T = T & "," & T2
End if
Next
T = Nothing
Next
[此贴子已经被作者于2009-2-13 18:05:34编辑过]