drawcell内全部的代码:e.Table.DataTable.AddUserStyle("标记",Color.White,Color.Red)
If e.Row(e.Col.Name) <> e.Row.DataRow.OriginalValue(e.Col.Name) Then
e.Style = "标记"
End If
DataTables("人员编制及到位人员").SysStyles("ModifiedCell").BackColor = Color.White
Dim t As String = e.Table.Name
Dim r As String = e.Row("_Identify")
Dim c As String = e.Col.Name
Dim filter As String = "表 = '" & t & "' and 行 = '" & r & "' and 列 = '" & c & "'"
Dim fdr As DataRow = DataTables("表B").Find(filter)
If fdr IsNot Nothing Then
e.Table.DataTable.AddUserStyle(t & r & c,Color.White, Color.FromArgb(fdr("颜色")))
e.Table.DataTable.styles(t & r & c).ForeColor = Color.FromArgb(fdr("颜色"))
e.style = t & r & c
End If
报错内容:
错误事件:表,人员编制及到位人员,Drawcell
调用的目标发生异常
未将对象引用设置到对象的实例
[此贴子已经被作者于2017/10/6 12:41:47编辑过]