InvalidOperationException in GridView after Q1 2013 update

2 posts, 0 answers
  1. Valeriu
    Valeriu avatar
    21 posts
    Member since:
    Dec 2010

    Posted 21 Feb 2013 Link to this post

    I'm trying to migrate our apps to latest version, Q1 2013. Having few issues, the blocking one is an InvalidOperationException.

    Description of one of the issues and steps it takes to reproduce:
     - WPF 4.0 app
     - RadTabControl as main canvas
     - RadGridView on one of the tabs, but not first
    To reproduce just switch between tabs: when coming to the tab with RadGridView for the second time the IOE is thrown.

    Exception details:

    System.InvalidOperationException was unhandled by user code
      HResult=-2146233079
      Message=Specified element is already the logical child of another element. Disconnect it first.
      Source=PresentationFramework
      StackTrace:
           at System.Windows.FrameworkContentElement.ChangeLogicalParent(DependencyObject newParent)
           at System.Windows.FrameworkElement.AddLogicalChild(Object child)
           at Telerik.Windows.Controls.GridView.GridViewDataControl.ColumnAdded(GridViewColumn column) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 3732
           at Telerik.Windows.Controls.GridViewColumn.OnOwnerChanged(GridViewDataControl oldOwner, GridViewDataControl newOwner) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewColumn.cs:line 1708
           at Telerik.Windows.Controls.GridViewBoundColumnBase.OnOwnerChanged(GridViewDataControl oldOwner, GridViewDataControl newOwner) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewBoundColumnBase.cs:line 1485
           at Telerik.Windows.Controls.GridViewColumn.set_DataControl(GridViewDataControl value) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\Columns\GridViewColumn.cs:line 1610
           at Telerik.Windows.Controls.GridView.GridViewDataControl.Grid_Loaded(Object sender, RoutedEventArgs e) in c:\TB\135\WPF_Scrum\Release_WPF\Sources\Development\Controls\GridView\GridView\GridView\GridViewDataControl.cs:line 2641
           at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
           at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
           at MS.Internal.FrameworkObject.OnLoaded(RoutedEventArgs args)
           at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
           at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
           at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
           at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
           at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
           at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
           at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
           at MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
      InnerException: 

    Any hints about the cause of the problem? Is it our code or something slipped trough your quality gates?

    Thanks
  2. Yoan
    Admin
    Yoan avatar
    1182 posts

    Posted 22 Feb 2013 Link to this post

    Hello Valeriu,

    As it turns out I was not able to reproduce this problem. For your convenience, I have attached a sample project. Would it be possible to test it at your side and let me know how it works? Please, feel free to modify it in order to reproduce the issue and resend it back to me.

    Greetings,
    Yoan
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top