蓝大好 我依葫芦画瓢 改了其中一段 不成功T_T 可以麻烦您帮忙改一下么 谢谢您啦
![dvubb 图片点击可在新窗口打开查看](images/emot/em255.gif)
Select Case e.DataCol.Name
Case "当月金额"
Dim dr As DataRow
Dim mr As DataRow = e.DataRow
Dim drs As List(of DataRow)
dr = e.DataTable.Find("[_SortKey] < " & mr("_SortKey") & " And [单位] = '" & mr("单位") & "' And [姓名] = '" & mr("姓名") & "'", "[_SortKey] Desc")
If dr Is Nothing Then
mr("累计金额") = mr("当月金额")
dr = mr
End If
drs = e.DataTable.Select("[_SortKey] >= " & dr("_SortKey") & " And [单位] = '" & mr("单位") & "' And [姓名] = '" & dr("姓名") & "'", "[_SortKey]")
For i As Integer = 1 To drs.Count - 1
drs(i)("累计金额") = drs(i)("当月金额")
Next
End Select