Drawcell代码:
DataTables("网络总课表").AddUserStyle("草绿蓝", Color.GreenYellow, Color.DarkBlue )
DataTables("网络总课表").AddUserStyle("灰蓝", Color.Gainsboro, Color.Blue)
Dim r As Row = Tables("网络教师课务明细表").current
Dim z1() As String = { "周1_1","周1_2","周1_3","周1_4","周1_5","周1_6","周1_7","周2_1","周2_2","周2_3","周2_4","周2_5","周2_6","周2_7","周3_1","周3_2","周3_3","周3_4","周3_5","周3_6","周3_7","周4_1","周4_2","周4_3","周4_4","周4_5","周4_6","周4_7","周5_1","周5_2","周5_3","周5_4","周5_5","周5_6","周5_7" }
For Each dc2 As String In z1
If e.Col.name = dc2 AndAlso r IsNot Nothing Then
If e.Row("年级") = r("年级") And e.Row("班级") = r("班级") Then
If e.Row(e.Col.name) = r("学科") Then
e.Style = "草绿蓝"
End If
End If
End If
Next
以上是符合的单元格显示草绿蓝,如果把该单元格所在的整个列显示灰蓝,请教老师,该加什么代码?