对当前已加载的数据,判断本列中是否有重复的,有就高亮显示。
DrawCell事件:
1 2 3 | If e.Col.Name = "关键词" AndAlso e.Table.Compute( "count(关键词)" , "关键词 = '" & e.Row( "关键词" ) & "'" ) > 1 Then e.Style = "红色框" End if |
AfterLoadTableSetting事件:
1 | e.Table.DataTable.AddUserStyle( "红色框" , Color.DarkRed, Color.White) |