老师好,项目后面再增加一个条件为姓名。谢谢老师!
If e.DataCol.Name = "项目" Then
If e.DataRow.IsNull("项目") = False Then
Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.NewValue & "' and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")
If dr1 IsNot Nothing Then
e.DataRow("总表_上期读数") = dr1("总表_本期读数")
End If
End If
End If
If e.DataCol.Name = "项目" orelse e.DataCol.Name = "姓名" Then
If e.DataRow.IsNull("项目") = False andalso e.DataRow.IsNull("姓名") = False Then
Dim dr1 As DataRow = e.DataTable.Find("项目='" & e.DataRow("项目") & "' and 姓名='" & e.DataRow("姓名") & "' and _sortkey <" & e.DataRow("_sortkey"),"_sortkey desc")