Hi all,

I have a grid designed like this, as a number selector:


Click to View Image59 View(s)

and all I need to do is to click on a cell and change it's colour and font, and clicking back, returning to the original cell's settings.

Here is the code that I coded:

   Private Sub IGrid1_CellClick(sender As Object, e As iGCellClickEventArgs) Handles IGrid1.CellClick

        With IGrid1

            If .CurCell.BackColor = Color.White Then
                .CurCell.BackColor = Color.LightGreen
                .CurCell.Font = New Font(.Font, FontStyle.Bold)
            ElseIf .CurCell.BackColor = Color.LightGreen Then
                .CurCell.BackColor = Color.White
                .CurCell.Font = New Font(.Font, FontStyle.Regular)
            End If

        End With

    End Sub

Very simple! but this is what I get after the click:


Click to View Image58 View(s)

Where is the code error here? wrong event?
Thank you!

Can you prepare a project that demonstrates the problem?
Hi Igor,

When I was preparing the sample project, the code started to work, but not all the time, sometimes works, sometimes not.
I think my mouse is taking one with my face, will change it.

Thank you anyway!