DevExpress GridView 当某个单元格值等于“查询值”时,改变单元格颜色
程序员文章站
2022-07-13 17:08:09
...
Private Sub GridView_Dsheet_CustomDrawCell(ByVal sender As Object, ByVal e As DevExpress.XtraGrid.Views.Base.RowCellCustomDrawEventArgs) Handles GridView_Dsheet.CustomDrawCell
On Error Resume Next
If e.Column.FieldName = "列名" Then
If InStr(isnull(GridView_Dsheet.GetDataRow(e.RowHandle).Item("列名"), ""), "查询字段值") > 0 Then
e.Cell.Appearance.BackColor = Color.Red
End If
End If
End Sub
上一篇: 支付宝接入流程