如判斷"A","B","C","D"列,配合Lxl版主的代碼,在DatacolChanged設置:
If "ABCD".IndexOf(e.DataCol.Name) > -1 Then
e.DataTable.DataCols("最大值").Recalc(e.DataRow)
Dim js As String() = {"A","B","C","D"}
For i As byte = 0 to js.length-1
If e.DataRow(js(i)) = Nothing Then
e.DataRow("最大值列") = Nothing
Else if e.DataRow(js(i)) = e.DataRow("最大值") Then
e.DataRow("最大值列") = js(i)
Exit For
End If
Next
End If
[此贴子已经被作者于2008-11-4 12:41:46编辑过]