皆さん、こんにちは
DevXpressのXtraGridViewの特定のセルの背景色を変更したい。
そして、セルは現在フォーカスされているセルでなければなりません。
これを行う方法?誰かがこの問題を解決するのを手伝ってくれますか?
ありがとう..
このリンクは役立つはずです
http://documentation.devexpress.com/#WindowsForms/CustomDocument758
この例では、この特定のコードを見ていきます。
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
このコードは、プログラミングがBevarageの2つのカテゴリの背景色を変更するのを支援する状況を支援しているように見えました。
間違えたらコメントしてください