汗,那你就这样测试,就例子我测试没问题
If e.Table.name = "窗口1_table2" Then
If e.Col.name Like "*户型" AndAlso e.text > "" Then
e.StartDraw()
Dim cs() As Char = {"栋","幢", "-", "#", "/"}
Dim fnt As New Font("宋体",9)
Dim drs As List(Of DataRow) = DataTables("表C").Select("小区地址 = '" & e.Row("小区地址") & "'")
For Each dr As DataRow In drs
Dim ary() As String = dr("楼号").split(cs)
If ary.length = 2 Then
If ary(0) & "幢" = e.Row("小区楼号") AndAlso ary(1).length >= e.text.length AndAlso ary(1).Substring(0, e.text.length) = e.text Then
e.text = ""
Dim msg As String = dr("消售情况")
e.Graphics.DrawString(msg,fnt,Brushes.Red,e.x+1, e.y+1)
Exit For
End If
End If
Next
e.EndDraw()
End If
End If