Guy DETIENNE
2016-02-02T13:00:19Z
Hi,

I encounter a weird behavior with the grid (Version 6.00, build 0000).

When I put the grid inside a PictureBox (I set the PictureBox's TabStop property to False), the last cell of the first row is automatically edited and the content is deleted.

The below events are raised (maybe other):

"RequestEdit"
"BeforeCommitEdit"
"AfterCommitEdit"

If I switch the PictureBox's TabStop property to True, this behavior no longer occurs.

Is this normal ?
Igor/10Tec
2016-02-03T07:15:00Z
It's not clear from your post when the problem occurs. How to reproduce this problem? When is the last cell automatically edited? When you hit TAB, or doing something else?

I created a brand new test project with one form, added a PictureBox to it and then inserted iGrid inside. I add 3 columns and 4 rows to the grid in the form's Load event, but I can't reproduce the problem - with either setting for the PictureBox's TabStop property.

Can you send us a sample project we can use to reproduce this issue?
Guy DETIENNE
2016-02-03T16:04:18Z
Hi Igor,

To be sure, like you I created a new project. I just added a PictureBox to a form and inserted an iGrid inside. Nothing else.
The PictureBox's TabStop property is set to False (default value).

See below the short code in the form's Load event. The problem occurs just after executing the project, no other manipulation...
The last cell of the first row is selected and the content is deleted. The events as listed in my previous email are raised.

If I set the PictureBox's TabStop property to True, the problem does not occur...


    Dim i As Long
  
    With Me.iGrid1
        
        .RowMode = False
        .Editable = True
        .FocusRect = True        

        For i = 1 To 4
            .AddCol "COL" & i, "COL" & i
        Next i
        
        For i = 1 To 10
            .AddRow
            .CellValue(i, "COL4") = "Text" & i
        Next i
        
    End With
Igor/10Tec
2016-02-04T08:32:29Z
When I launch your code, I see no problem. The result is expected:

iGrid in PictureBox Problem.png

Click to View Image171 View(s)



Guy DETIENNE
2016-02-04T09:29:42Z
I would like to show my result by uploading a picture but how can I do this ?
Igor/10Tec
2016-02-05T07:36:27Z
See this post with the detailed instructions:

Upload images to this forum 

But your image will not help me a lot. I need a sample to reproduce the bug.