红袍老师, Dim clname() As String=drs("取值显示列").split(",") 这个是单元格的值是 ID,CNAME
Dim item As Integer
Tables("通用目录树_table1").DataSource =DataTables(drs("取值表"))
For Each r As Col In Tables("通用目录树_table1").Cols
r.Visible=False
Next
For item=0 To clname.Length-1
Tables("通用目录树_table1").Cols(clname(item)).Visible=True ‘为何这块的显示就变成了 CNAME,ID 这个是不是数组自动排序了,如何能按照单元格的值是 ID,CNAME,这个顺序显示呢?
Next
Tables("通用目录树_table1").ExtendLastCol=True
Tables("通用目录树_table1").DataTable.SysStyles("EmptyArea").BackColor = Color.AliceBlue
Tables("通用目录树_table1").AllowEdit=False