<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="http://syndication.webwiz.co.uk/rss_namespace/">
 <channel>
  <title>DevForce Community Forum : Simple Delete problem</title>
  <link>http://www.ideablade.com/forum/</link>
  <description>This is an XML content feed of; DevForce Community Forum : DevForce 2010 : Simple Delete problem</description>
  <pubDate>Tue, 21 Apr 2026 05:50:22 -700</pubDate>
  <lastBuildDate>Wed, 05 May 2010 14:16:30 -700</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 9.69</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>www.ideablade.com/forum/RSS_post_feed.asp?TID=1780</WebWizForums:feedURL>
  <image>
   <title>DevForce Community Forum</title>
   <url>http://www.ideablade.com/forum/forum_images/IdeaBlade_logo_tm.png</url>
   <link>http://www.ideablade.com/forum/</link>
  </image>
  <item>
   <title>Simple Delete problem : Nope was gonna tell them you blamed...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6794#6794</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 05-May-2010 at 2:16pm<br /><br /><P>Nope was gonna tell them you blamed them .....</P>]]>
   </description>
   <pubDate>Wed, 05 May 2010 14:16:30 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6794#6794</guid>
  </item> 
  <item>
   <title>Simple Delete problem : I want to reiterate that I&amp;#039;m...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6793#6793</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 05-May-2010 at 2:15pm<br /><br /><P>I want to reiterate that I'm not trying to blame someone else. I'm happy to work with you and them to get it solved and will take responsibility for our part in the drama. But right now, I don't know where to begin ... because the error is coming from action taken by DevExpress after we innocently proceed with our deletion logic.</P><DIV>Keep us in the loop.</DIV>]]>
   </description>
   <pubDate>Wed, 05 May 2010 14:15:24 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6793#6793</guid>
  </item> 
  <item>
   <title>Simple Delete problem : tx Ward for explaining. Sometimes...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6790#6790</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 05-May-2010 at 2:01pm<br /><br />tx Ward for explaining. Sometimes it is hard to tell which 3rd party product is causing the problem. I have found a handful of bugs with DevExpress that I am waiting for them to update.]]>
   </description>
   <pubDate>Wed, 05 May 2010 14:01:49 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6790#6790</guid>
  </item> 
  <item>
   <title>Simple Delete problem : So you&amp;#039;ve found a DevExpress...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6789#6789</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 05-May-2010 at 1:48pm<br /><br />So you've found a DevExpress bug and you should report it to them<DIV>&nbsp;</DIV><DIV>&nbsp;&nbsp;&nbsp; &nbsp;at System.Collections.Specialized.ListDictionary.get_Item(Object key)<BR>&nbsp;&nbsp;&nbsp;&nbsp; at System.ComponentModel.PropertyDescriptorCollection.Find(String name, Boolean ignoreCase)<BR>&nbsp;&nbsp;&nbsp;&nbsp; at <strong>DevExpress.Wpf.Core.Native.BindingListAdapter</strong>.System.Windows.IWeakEventListener.ReceiveWeakEvent(</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type managerType, Object sender, EventArgs e)<BR>&nbsp;&nbsp;&nbsp;&nbsp; at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)<BR>&nbsp;&nbsp;&nbsp;&nbsp; at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(</DIV><DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Object sender, PropertyChangedEventArgs args)<BR>...</DIV><DIV>&nbsp;</DIV><DIV>Why is it their bug? Because they should be impervious to anything we do, almost no matter how wrong headed. </DIV><DIV><BR>I do not understand why you cannot remove the item from the collection maintained by your VM. You'll want to figure that out. That appears to be the precipitating event in this exception, btw. Looks like a DevExpress issue again. </DIV><DIV>&nbsp;</DIV><DIV>Happy to work with them and you to figure out what to do. I'm not trying to dump on them. But I don't</DIV><DIV>&nbsp;</DIV><DIV>That doesn't help you in the meanwhile.</DIV><DIV>&nbsp;</DIV><DIV>Removing the collection from the control is not something you want to do from within the VM. In principle you can replace the collection returned from the VM property to which the grid binds ... and do so entirely within the VM. However, that is likely to cause more problems as any control listening will reset itself ... and users will not like the consequences.</DIV><DIV>&nbsp;</DIV><DIV>Suggest you experiment with other objects and the grid to find out what DevExpress&nbsp;likes and what triggers it to dislike something. Does it object to removing all objects of any kind? What happens when you detach rather than delete a DevForce object (use the manager's Remove method)?</DIV><DIV>&nbsp;</DIV><DIV>Sorry to throw it back at you. I'm just not seeing yet how DevForce is contributing to the problem.</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 05 May 2010 13:48:08 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6789#6789</guid>
  </item> 
  <item>
   <title>Simple Delete problem : The error is thrown at the CurrentItem.EntityAspect.Delete...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6780#6780</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 05-May-2010 at 7:30am<br /><br /><DIV>The error is thrown at the CurrentItem.EntityAspect.Delete call. The error is Key cannot be null. Paramter name: key. and stack is below.</DIV><DIV>&nbsp;</DIV><DIV><DIV>You are correct the item is detached and I understand why it is complaining. The problem is that I am using the MVVM pattern and I have access to the collection. But when I try and remove from the collection it never returns. When looking in the Output window I see "The trhead '&lt;No Name&gt;' (0x...) has exited with code 0 (0x0)." where 0x... changes for each line.</DIV><DIV>&nbsp;</DIV><DIV>I ended up having to remove from the control source in the view. Maybe you can answer. Is that ok when using MVVM. I know some code can go there but?</DIV></DIV><DIV>&nbsp;</DIV><DIV>Stack:</DIV><DIV>&nbsp;&nbsp; at System.Collections.Specialized.ListDictionary.get_Item(Object key)<BR>&nbsp;&nbsp; at System.ComponentModel.PropertyDescriptorCollection.Find(String name, Boolean ignoreCase)<BR>&nbsp;&nbsp; at DevExpress.Wpf.Core.Native.BindingListAdapter.System.Windows.IWeakEventListener.ReceiveWeakEvent(Type managerType, Object sender, EventArgs e)<BR>&nbsp;&nbsp; at System.Windows.WeakEventManager.DeliverEventToList(Object sender, EventArgs args, ListenerList list)<BR>&nbsp;&nbsp; at System.ComponentModel.PropertyChangedEventManager.OnPropertyChanged(Object sender, PropertyChangedEventArgs args)<BR>&nbsp;&nbsp; at IdeaBlade.EntityModel.EntityWrapper.OnPropertyChanged(PropertyChangedEventArgs e)<BR>&nbsp;&nbsp; at IdeaBlade.EntityModel.EntityGroup.OnEntityChanged(EntityChangedEventArgs e)<BR>&nbsp;&nbsp; at IdeaBlade.EntityModel.EntityGroup.RemoveEntity(EntityWrapper wrapper)<BR>&nbsp;&nbsp; at IdeaBlade.EntityModel.EntityWrapper.Delete()<BR>&nbsp;&nbsp; at IdeaBlade.EntityModel.EntityAspect.Delete()<BR>&nbsp;&nbsp; at LOC.AMP.Foundation.ViewModel.SearchPageViewModel.DeleteItem() in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\Foundation\LOC.AMP.Foundation\ViewModel\SearchPageViewModel.cs:line 147<BR>&nbsp;&nbsp; at LOC.AMP.Demo.ViewModel.RolodexExampleViewModel.DeleteItem() in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\UI\LOC.AMP.Demo\ViewModel\RolodexExampleViewModel.cs:line 99<BR>&nbsp;&nbsp; at LOC.AMP.Foundation.ViewModel.SearchPageViewModel.&lt;get_DeleteContactCommand&gt;b__1() in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\Foundation\LOC.AMP.Foundation\ViewModel\SearchPageViewModel.cs:line 172<BR>&nbsp;&nbsp; at GalaSoft.MvvmLight.Command.RelayCommand.Execute(Object parameter)<BR>&nbsp;&nbsp; at LOC.AMP.Demo.View.RolodexExampleView.Contact_DeleteRow(Object sender, RoutedEventArgs e) in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\UI\LOC.AMP.Demo\View\RolodexExampleView.xaml.cs:line 45<BR>&nbsp;&nbsp; at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<BR>&nbsp;&nbsp; at LOC.AMP.Foundation.View.SearchControl.mGridControl_DeleteRow(Object sender, RoutedEventArgs e) in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\Foundation\LOC.AMP.Foundation\View\SearchControl.xaml.cs:line 164<BR>&nbsp;&nbsp; at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<BR>&nbsp;&nbsp; at LOC.AMP.Foundation.View.BaseGridControl.ExecuteDelete(Object sender, ExecutedRoutedEventArgs e) in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\Foundation\LOC.AMP.Foundation\View\BaseGridControl.xaml.cs:line 155<BR>&nbsp;&nbsp; at System.Windows.Input.CommandBinding.OnExecuted(Object sender, ExecutedRoutedEventArgs e)<BR>&nbsp;&nbsp; at System.Windows.Input.CommandManager.ExecuteCommandBinding(Object sender, ExecutedRoutedEventArgs e, CommandBinding commandBinding)<BR>&nbsp;&nbsp; at System.Windows.Input.CommandManager.FindCommandBinding(CommandBindingCollection commandBindings, Object sender, RoutedEventArgs e, ICommand command, Boolean execute)<BR>&nbsp;&nbsp; at System.Windows.Input.CommandManager.FindCommandBinding(Object sender, RoutedEventArgs e, ICommand command, Boolean execute)<BR>&nbsp;&nbsp; at System.Windows.Input.CommandManager.OnExecuted(Object sender, ExecutedRoutedEventArgs e)<BR>&nbsp;&nbsp; at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)<BR>&nbsp;&nbsp; at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)<BR>&nbsp;&nbsp; at System.Windows.Input.RoutedCommand.ExecuteImpl(Object parameter, IInputElement target, Boolean userInitiated)<BR>&nbsp;&nbsp; at System.Windows.Input.CommandManager.TranslateInput(IInputElement targetElement, InputEventArgs inputEventArgs)<BR>&nbsp;&nbsp; at System.Windows.UIElement.OnKeyDownThunk(Object sender, KeyEventArgs e)<BR>&nbsp;&nbsp; at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)<BR>&nbsp;&nbsp; at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)<BR>&nbsp;&nbsp; at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)<BR>&nbsp;&nbsp; at System.Windows.Input.InputManager.ProcessStagingArea()<BR>&nbsp;&nbsp; at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)<BR>&nbsp;&nbsp; at System.Windows.Interop.HwndKeyboardInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawKeyboardActions actions, Int32 scanCode, Boolean isExtendedKey, Boolean isSystemKey, Int32 virtualKey)<BR>&nbsp;&nbsp; at System.Windows.Interop.HwndKeyboardInputProvider.ProcessKeyAction(MSG&amp; msg, Boolean&amp; handled)<BR>&nbsp;&nbsp; at System.Windows.Interop.HwndSource.CriticalTranslateAccelerator(MSG&amp; msg, ModifierKeys modifiers)<BR>&nbsp;&nbsp; at System.Windows.Interop.HwndSource.OnPreprocessMessage(Object param)<BR>&nbsp;&nbsp; at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)<BR>&nbsp;&nbsp; at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)<BR>&nbsp;&nbsp; at System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)<BR>&nbsp;&nbsp; at System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)<BR>&nbsp;&nbsp; at System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)<BR>&nbsp;&nbsp; at System.Windows.Interop.HwndSource.OnPreprocessMessageThunk(MSG&amp; msg, Boolean&amp; handled)<BR>&nbsp;&nbsp; at System.Windows.Interop.ComponentDispatcherThread.RaiseThreadMessage(MSG&amp; msg)<BR>&nbsp;&nbsp; at System.Windows.Threading.Dispatcher.TranslateAndDispatchMessage(MSG&amp; msg)<BR>&nbsp;&nbsp; at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)<BR>&nbsp;&nbsp; at System.Windows.Application.RunInternal(Window window)<BR>&nbsp;&nbsp; at System.Windows.Application.Run()<BR>&nbsp;&nbsp; at LOC.AMP.Shell.App.Main() in C:\Development\CEMS2.0\MVVMLite\AssociationManagementPro\LOC.AMP.Shell\obj\Debug\App.g.cs:line 0<BR>&nbsp;&nbsp; at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String&#091;&#093; args)<BR>&nbsp;&nbsp; at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()<BR>&nbsp;&nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)<BR>&nbsp;&nbsp; at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)<BR>&nbsp;&nbsp; at System.Threading.ThreadHelper.ThreadStart()</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV>]]>
   </description>
   <pubDate>Wed, 05 May 2010 07:30:01 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6780#6780</guid>
  </item> 
  <item>
   <title>Simple Delete problem : Who is throwing the error? DevEx?...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6777#6777</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=482" rel="nofollow">WardBell</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 04-May-2010 at 7:42pm<br /><br />Who is throwing the error? DevEx? DevForce? What is the full error?&nbsp; What are the characteristics of the entity being deleted (its key and its foreign keys); we will set the FKs null if they are nullable. <DIV>&nbsp;</DIV><DIV>I'm guessing this is the CONTROL complaining ... that is holding a copy of the now detached object and trying to do something with it. If I'm correct, the proper sequence is to remove the entity from the Control's "ItemsSource" and then call delete on it.</DIV><DIV>&nbsp;</DIV><DIV>But I am guessing.</DIV><span style="font-size:10px"><br /><br />Edited by WardBell - 04-May-2010 at 7:42pm</span>]]>
   </description>
   <pubDate>Tue, 04 May 2010 19:42:02 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6777#6777</guid>
  </item> 
  <item>
   <title>Simple Delete problem : When I try and delete an entity...</title>
   <link>http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6769#6769</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://www.ideablade.com/forum/member_profile.asp?PF=136" rel="nofollow">orcities</a><br /><strong>Subject:</strong> 1780<br /><strong>Posted:</strong> 04-May-2010 at 2:09pm<br /><br />When I try and delete an entity using CurrentItem.EntityAspect.Delete() it throws an error:<DIV>Key cannot be null. Paramter name: key.</DIV><DIV>&nbsp;</DIV><DIV>Before running the delete the item state is added. After the error the item state is unattached.</DIV><DIV>&nbsp;</DIV><DIV>Why the error?</DIV>]]>
   </description>
   <pubDate>Tue, 04 May 2010 14:09:53 -700</pubDate>
   <guid isPermaLink="true">http://www.ideablade.com/forum/forum_posts.asp?TID=1780&amp;PID=6769#6769</guid>
  </item> 
 </channel>
</rss>