Hi Samuel,
If you are using a databound flexgrid, then whenever we make any change in
flexgrid, it fires an AfterDataRefresh event, so i would suggest you to capture
this event and then you can check the value in a cell and set the background
color of the cell.
below is a code snippet:
Dim cs As
C1.Win.C1FlexGrid.CellStyle
cs = C1FlexGrid1.Styles.Add("back_color")
Private
Sub
C1FlexGrid1_AfterDataRefresh(
ByVal sender
As Object,
ByVal e
As
System.ComponentModel.ListChangedEventArgs)
Handles
C1FlexGrid1.AfterDataRefresh
If C1FlexGrid1.Item(1, 1) = "Jack" Then
cs.BackColor = Color.Red
C1FlexGrid1.SetCellStyle(1, 1, cs)
End If
End Sub
you can also try
the validateedit, validating and validated events as per your
requirement.
Regards,
John
Adams
Hello,
I
want to know if there is a possibility to colore a cell of a
flexgrid
according to whats it contains and on which event will you do
it.
Samuel
http://home.componentone.com/cs/forums/184081/ShowPost.aspx