- Private Sub fgzd_OwnerDrawCell(sender As Object, e As OwnerDrawCellEventArgs) Handles fgzd.OwnerDrawCell
- Try
- Dim row As Integer = e.Row - 1, col = e.Col
- Dim fx As C1FlexGrid = TryCast(sender, C1FlexGrid)
- Dim cs As CellStyle = fgzd.Styles.Add("custom")
- cs.BackColor = Color.Red
- If row > 0 And col > 0 Then
- Dim dd As Object
- dd = fx.GetData(row, col)
- If dd IsNot Nothing Then
- If (e.Text = dd.ToString) Then
- e.Style = cs
- fx.SetCellStyle(row, col, cs)
- End If
- End If
- End If
- Catch ex As Exception
- ExceptionProcess(ex)
- End Try
- End Sub
复制代码
老师 你看下。。我这个事件进不去 哪有错 |