Select Case e.DataCol.name Case "年休_1","年休_2","年休_3","年休_4" Dim dr As DataRow = e.DataRow dr("合计") = iif(dr.IsNull("年休_1"),0,1) + iif(dr.IsNull("年休_2"),0,1) + iif(dr.IsNull("年休_3"),0,1) + iif(dr.IsNull("年休_4"),0,1)End Select