Friday, November 4, 2016

DevExpress-Gridview(RowColor)

Imports DevExpress.XtraGrid.Views.Grid

Private Sub GridView1_RowStyle(ByVal sender As Object, _
ByVal e As DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs) Handles GridView1.RowStyle
   Dim View As GridView = sender
   If (e.RowHandle >= 0) Then
      Dim category As String = View.GetRowCellDisplayText(e.RowHandle, View.Columns("Category"))
      If category = "Beverages" Then
         e.Appearance.BackColor = Color.Salmon
         e.Appearance.BackColor2 = Color.SeaShell
      End If
   End If
End Sub




file://C:\Users\chatchda\AppData\Local\Temp\ct_tmp/1.png

No comments:

Post a Comment