AutoEdit issue

1 posts, 0 answers
  1. vk
    vk avatar
    46 posts
    Member since:
    Jul 2012

    Posted 31 May 2012 Link to this post


    I use a RadDataForm bound to a QDSCV. If I set the AutoEdit property to true (AutoCommit is also true), make some modifications to a current item, move to the next item and then try to submit changes, I get an exception saying that "Entity is currently being edited and has uncommited changes". It seems that QDSCV.CommitEdit() for the previous item has not been called... So to workaround it I have to call it in the QDSVC's CurrentChanging event, but I'm not sure this is the correct way...

    void qdscv_CurrentChanging(object sender, CurrentChangingEventArgs e)
     if (qdscv.CurrentItem != null && (qdscv.CurrentItem as Entity).EntityState != EntityState.Deleted)
      if (qdscv.IsEditingItem) qdscv.CommitEdit();

Back to Top