I have code like this:
Private Sub GV_Data_Kerja_RowStyle(sender As System.Object, e As DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs) Handles GV_Data_Kerja.RowStyle
If row_mod = 1 Then
Dim c As New Color
c = Color.Yellow
If e.Appearance.BackColor = c Then
e.Appearance.BackColor = Nothing
MessageBox.Show(e.Appearance.BackColor.ToString)
Else
e.Appearance.BackColor = c
MessageBox.Show(e.Appearance.BackColor.ToString)
End If
MessageBox.Show(e.Appearance.BackColor.ToString)
row_mod = 0
End If
End Sub
It triggered by Sub GV_Data_Kerja.RefreshRow(RowHandled)
, but it does not work. In every message box which placed there, it always return white color. This mean, my code for change back color does not work. Can anyone help me?
Looks to me that your code kinda works. I have tried it and it changes color. But it works when I remove MessageBox debug messages.
Advice DO NOT use MessageBox to display data as it interferes with what you are trying to debug, instead write to log file or console output.
It looks like you put them to debug, they caused all sorts of problems, you solved original problem but MessageBox problems remained.