For Each jls As String In yms
If jls<>"基本资料" Then
yq.TabPages.Add(jls,jls)
i =i+1
Dim kj As WinForm.RecordGrid
kj =e.Form.CreateControl("页签", ControlTypeEnum.RecordGrid)
kj.Left =5
kj.Top =5
kj.Width =495
kj.Height =485
Dim ym As WinForm.TabPage =e.Form.Controls("页签").TabPages(i)
ym.AddControl(kj)
kj.Table = Tables(e.Form.Name) '指定绑定表
kj.Columns = DataTables("页面显示").GetComboListString("显示列","页签='" & jls & "'","排序")
kj.Build
'''''''锁定列 必填列涂色
Dim g = kj.basecontrol
g.Styles.normal.Border.Style = 3
g.styles.Normal.Border.Color = Color.Black
g.styles.Normal.Border.width = 3
Dim Multi As String =dr("锁定列")
If Multi> "" Then
Dim Values() As String
Values = Multi.split("|")
For idx As Integer = 0 To Values.Length - 1
Tables(e.Form.Name).Cols( Values(idx) ).AllowEdit =False
g.GetCellStyle( Tables(e.Form.Name).Cols( Values(idx) ).Index ,1).BackColor = Color.Gainsboro
Next
End If
Dim btl As String =dr("必填字段")
If btl> "" Then
Dim jcbts() As String = btl.split("|")
For Index As Integer = 0 To jcbts.Length - 1
g.GetCellStyle( Tables(e.Form.Name).Cols( jcbts(Index) ).Index ,1).BackColor = Color.pink
Next
End If
'''''''锁定列 必填列涂色
Else
jljbxx.Table = Tables(e.Form.Name) '指定绑定表
jljbxx.Columns = DataTables("页面显示").GetComboListString("显示列","页签='基本资料'","排序")
jljbxx.Build
End If
Next