Dim b As New DataTableBuilder("NewTable") ',临时表
With b
.AddDef ("列名" ,Gettype(String),20)
.AddDef("类型" ,Gettype(String), 12)
.AddDef("长度" ,Gettype(Integer ))
.AddDef("标题" ,Gettype(String),50)
End With
b.Build()
Tables("增加表_Table1").DataSource =b.BuildDataSource 'DataTables("NewTable")
Dim tb As Table = Tables("增加表_Table1")
Dim ri() As String ={ "第一列","第二列","第三列" ,"第四列","第五列","第六列","第七列","第八列","第九列", "第十列" }
With tb
For i As Integer =0 To 9
.AddNew()
.Current("列名")=ri(i)
.Current("类型")="字符"
.Current("长度")=16
Next
.RowHeaderVisible = False
.AllowEdit=True
.Cols("类型").ComboList=DataTables("sys_DataType").GetComboListString("DataCaption","","_Identify")
End With
'//** 在<增加数据表> @cb-选择数据源 显示已有数据源
Dim cb As WinForm.ComboBox = e.Form.Controls("ComboBox1")
Dim dts As String ="内部数据源"
For Each cn As Connection In Connections
dts=dts & "|" & cn.Name
Next
If dts <> Nothing Then
cb.ComboList=dts
End If
cb.Value="内部数据源"