Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
Symbols  
#1 Posted : Wednesday, March 29, 2017 7:20:20 AM(UTC)
Symbols

Rank: Newbie

Groups: Registered
Joined: 2/10/2011(UTC)
Posts: 4
Man
Location: Brasil

Hi all,

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

Untitled1.png

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:

Code:
   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

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



Igor/10Tec  
#2 Posted : Wednesday, March 29, 2017 3:27:45 PM(UTC)
Igor/10Tec

Rank: Administration

Groups: Administrators, Forum Moderator
Joined: 1/17/2011(UTC)
Posts: 749

Thanks: 11 times
Was thanked: 98 time(s) in 98 post(s)
Can you prepare a project that demonstrates the problem?
Symbols  
#3 Posted : Wednesday, March 29, 2017 4:17:58 PM(UTC)
Symbols

Rank: Newbie

Groups: Registered
Joined: 2/10/2011(UTC)
Posts: 4
Man
Location: Brasil

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!
Users browsing this topic
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.