Select Case e.DataCol.Name Case "项目子任务_计划完成日期" Dim drf As DataRow = e.DataRow If drf.IsNull("项目子任务_计划完成日期") = False Then For Each dr As DataRow In e.DataTable.Select("任务标题 is not null and [_SortKey] >= " & e.DataRow("_SortKey")) Dim d As Date = e.DataTable.Compute("max(项目子任务_计划完成日期)","[_SortKey] < " & dr("_SortKey")) dr("紧前工作完成日期") = d Next End If End Select