How can I change the XtrsGrid's (GridControl) cell background after its value has been updated/changed/edited?
Can I do it in following event:
AddHandler grdView.RowCellStyle, AddressOf grdView_RowCellStyle
But this changes the color of whole Grid cells.
Private Sub grdView_RowCellStyle(sender As Object, e As RowCellStyleEventArgs)
e.Appearance.BackColor = Color.Blue
End Sub
EDIT: I need to turn every cell color change whenever a cell value is changed.
I finally managed to do it in the following way!
GridView.CellValueChanged
GridView.CustomDrawCell
Create a class and three fields in it.
Initialize the list in your
Form1_Load
function.Now, in
GridView.CellValueChanged
event, do the following:Now, do the following in
GridView.CustomDrawCell
event:Note that the argument
e As RowCellCustomDrawEventArgs
contains all required information. We just need to care of edited cells indices becauseGridView.CustomDrawCell
calls every time row/column focus is changed.See the result.
Before
And After
NOTE that yellow cells have different values that I changed using inline/inplace editor.
Thanks