Public Function DGStyle11() As DataGridTableStyle
'第二个样式
Dim ts11 As DataGridTableStyle = New DataGridTableStyle
ts11.MappingName = "style11"
Dim cs11 As DataGridColumnStyle = New DataGridTextBoxColumn
cs11.MappingName = "Item Number"
cs11.HeaderText = "料号"
cs11.Width = 50
ts11.GridColumnStyles.Add(cs11)
Dim cs12 As DataGridColumnStyle = New DataGridTextBoxColumn
cs12.MappingName = "Description"
cs12.HeaderText = "描述"
cs12.Width = 100
ts11.GridColumnStyles.Add(cs12)
Dim cs13 As DataGridColumnStyle = New DataGridTextBoxColumn
cs13.MappingName = "CPCount"
cs13.HeaderText = "盘点"
cs13.Width = 30
ts11.GridColumnStyles.Add(cs13)
Dim cs14 As DataGridColumnStyle = New DataGridTextBoxColumn
cs14.MappingName = "Stock"
cs14.HeaderText = "系统盘点"
cs14.Width = 30
ts11.GridColumnStyles.Add(cs14)
Dim cs15 As DataGridColumnStyle = New DataGridTextBoxColumn
cs15.MappingName = "Diff"
cs15.HeaderText = "差异"
cs15.Width = 30
ts11.GridColumnStyles.Add(cs15)
Dim cs16 As DataGridColumnStyle = New DataGridTextBoxColumn
cs16.MappingName = "PG"
cs16.HeaderText = "PG"
cs16.Width = 20
ts11.GridColumnStyles.Add(cs16)
Dim cs17 As DataGridColumnStyle = New DataGridTextBoxColumn
cs17.MappingName = "Shop"
cs17.HeaderText = "Shop"
cs17.Width = 50
ts11.GridColumnStyles.Add(cs17)
Return ts11
End Function
dg1.TableStyles.Add(DGStyle11)