.NET Framework 版本:4.0.30319.42000
Foxtable 版本:2020.5.29.8
错误所在事件:村干部基本信息,AfterSelRangeChange
详细错误信息:
值不能为 null。
参数名: key
Dim c As Col = e.Table.Cols(e.NewRange.LeftCol)
Dim dict As new Dictionary(of String,Integer)
Dim r As Row
For i As Integer = e.NewRange.TopRow To e.NewRange.BottomRow
r = e.Table.Rows(i)
If dict.ContainsKey(r(c.Name)) Then
dict(r(c.Name)) += 1
Else
dict.Add(r(c.Name),1)
End If
Next
Dim f As Integer = e.Table.Cols("学历_全日制").Index
Dim f2 As Integer = e.Table.Cols("党组织建制").Index
Dim f3 As Integer = e.Table.Cols("干部类型").Index
Dim f4 As Integer = e.Table.Cols("工作单位_村居社区").Index
If e.NewRange.LeftCol = e.NewRange.RightCol AndAlso (e.NewRange.LeftCol =f OrElse e.NewRange.LeftCol =f2 OrElse e.NewRange.LeftCol =f3 OrElse e.NewRange.LeftCol =f4) Then
Dim s As String = ""
For Each key As String In dict.Keys
s = s & ";" & key & ":" & dict(key)
StatusBar.Message2 = s
Next
Else
StatusBar.Message2 = ""
End If
请版主帮忙指导!