Print Page | Close Window

IEditableObject.CancelEdit() Error

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2010
Forum Discription: For .NET 4.0
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=1801
Printed Date: 21-Apr-2026 at 5:49am


Topic: IEditableObject.CancelEdit() Error
Posted By: orcities
Subject: IEditableObject.CancelEdit() Error
Date Posted: 11-May-2010 at 7:52am

I am getting the following error when I try and cancel an edit using DevExpress. Not sure which end this is on. If I override CancelEditCore the error is throw when it is called.

Key cannot be null.\r\nParameter name: key
 
Stack:
   at System.Collections.Specialized.ListDictionary.get_Item(Object key)
   at System.ComponentModel.PropertyDescriptorCollection.Find(String name, Boolean ignoreCase)
   at DevExpress.Wpf.Core.Native.BindingListAdapter.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)
   at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)
   at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)
   at IdeaBlade.EntityModel.EntityWrapper.OnPropertyChanged(PropertyChangedEventArgs e)
   at IdeaBlade.EntityModel.EntityWrapper.ForcePropertyChanged(PropertyChangedEventArgs e)
   at IdeaBlade.EntityModel.EntityWrapper.CancelEditCore()
   at IdeaBlade.EntityModel.EntityWrapper.System.ComponentModel.IEditableObject.CancelEdit()
   at DevExpress.Wpf.Data.StateGridDataController.CancelCurrentRowEdit()
 
Any help would be great.



Replies:
Posted By: ting
Date Posted: 12-May-2010 at 8:02pm
It's hard to tell what's going on here.  The exception basically says that the DevExpress grid can't find the bound property where the edit was cancelled, but that may or may not be related to the actual problem.
 
I'd start by constructing the simplest possibile solution with one bound column to a simple property (with no object navigation) that overrides CancelEdit and see if that works.  Then start changing the solution to match what you're trying to do above.
 
 



Print Page | Close Window