This is a migrated thread and some comments may be shown as answers.

AutoEdit issue

0 Answers 94 Views
DataForm
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
vk
Top achievements
Rank 1
vk asked on 31 May 2012, 02:18 PM
Hi,

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();
 }
}

Tags
DataForm
Asked by
vk
Top achievements
Rank 1
Share this question
or