此主题相关图片如下:field001.png

DataColChanged事件代码:
If Left(e.DataCol.Name,1) = "Y" Then
Dim yx,lh,hg As Integer
For Each dc As DataCol In e.DataTable.DataCols
If Left(dc.Name,1) = "Y" Then
Select Case e.DataRow(dc.Name)
Case "优秀"
yx = yx + 1
Case "良好"
lh = lh + 1
Case "合格"
hg = hg + 1
End Select
End If
Next
e.DataRow("优秀") = yx
e.DataRow("良好") = lh
e.DataRow("合格") = hg
End If