Home Forums WinForms controls Xceed Grid for WinForms simple problem – how do I ensure current cell edits save

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

    This is probably a really simple problem, but here it is nonetheless:

    I have a form with two grids which are parent/child and I want to save the child and reload when the parent row changes. If I edit a cell in the child, then select a different row in the parent, I lose the changes in the cell unless I first scroll to a different row in the child.

    The documentation for the grid indicates that something like

    childgrid.currentcell.leaveedit(True)

    should do the trick, but no such luck. I am calling this on the parent.rowindexchanged event – is there somewhere else I should try (childgrid.leave)?

    Imported from legacy forums. Posted by bearman (had 1972 views)

    User (Old forums)
    Member
    Post count: 23064

    figured it out from another posting. You need to end edit on the row:

    If CType(dg_line_items.CurrentRow, Xceed.Grid.DataRow).IsBeingEdited Then
    CType(dg_line_items.CurrentRow, Xceed.Grid.DataRow).EndEdit()
    End If

    Imported from legacy forums. Posted by bearman (had 2938 views)

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