Home Forums WinForms controls Xceed Grid for WinForms Insertion Row Bug

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #14574 |

    Hi

    Can someone please confirm if this is a bug
    If you add a insertion row to a GridControl. The grid has 2 columns
    FirstName,LastName

    1. You add one valid row containing Peter , Jones
    2. Put your mouse in the LastName column belonging to the insertion row
    3. Then put your mouse on the existing row for Peter Jones

    What happens.
    It actually registers the empty row that was the insertion row as a NEW ROW
    This is not a correct behaviour
    Comments

    Imported from legacy forums. Posted by TV (had 1807 views)

    User (Old forums)
    Member
    Post count: 23064

    This is not a bug. When the InsertionRow is clicked, it goes into edition (SingleClickEdit), so when you leave the InsertionRow, it commits the edition. This is done because you are bound to a DataSource, and this is the mechanism that is implemented in .NET. You need to leave edition by pressing Escape, or subscribe to the EndingEdit event on the InsertionRow and cancel the commit.

    ie:

    Private Sub InsertionRow_EndingEdit(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs)

    For Each cell As Xceed.Grid.Cell In InsertionRow3.Cells
    If Not cell.Value.ToString() = String.Empty Then
    Return
    End If
    Next

    e.Cancel = True
    End Sub

    Imported from legacy forums. Posted by TV (had 2989 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.