Tables("客户").Cols("省").DropTree = tb.Build()
改为:
Tables("父表.子表").Cols("省").DropTree = tb.Build()
或者:
e.Col.DropTree = tb.Build()
记得判断列名,例如:
If e.Col.Name = "sss" AndAlso e.IsFocusCell Then
Dim tb As New DropTreeBuilder
tb.SourceTable = DataTables("行政区域") '指定目录树表
tb.TreeCols = "省|县市" '指定用于生成目录树的列
tb.SourceCols = "省|县市|区号|邮编" '指定数据来源列
tb.ReceiveCols = "省|县市|区号|邮编" '指定数据接收列
e.Col.DropTree = tb.Build()
End If
[此贴子已经被作者于2012-12-18 16:34:50编辑过]