2011-03-06 6 views
0

안녕하세요 친구 변경 XtraGridView 셀의 배경색

은 내가 디벨로퍼 익스프레스의 XtraGridView의 특정 셀의 배경색을 변경하고 싶습니다.

셀은 현재 포커스가있는 셀이어야합니다.

어떻게 하시겠습니까? 아무도 나를이 문제를 해결하는 데 도움이 될 수 있습니까?

고맙습니다 ..

답변

0

이 링크는 내가이 특정 코드를 볼 것, 예에서

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 두 categoris의 배경색을 변경 도움의 상황에 도움이 보였다. 내가

+0

이보기 실수 http://stackoverflow.com/questions/30166372/vb-net-xtragrid-change-cell-color-after-its-value-is-edited 한 경우

는 의견을주십시오 –