Home Forums WinForms controls Xceed Grid for WinForms Insertion Row Bug Reply To: Insertion Row Bug

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)