Symbols
2017-03-29T07:20:20Z
Hi all,

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

Untitled1.png

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
            .BeginUpdate()

            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

            .EndUpdate()
        End With

    End Sub

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

Untitled2.png

Click to View Image58 View(s)



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



Igor/10Tec
2017-03-29T15:27:45Z
Can you prepare a project that demonstrates the problem?
Symbols
2017-03-29T16:17:58Z
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!