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

InvalidOperationException in GridView after Q1 2013 update

1 Answer 88 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Valeriu
Top achievements
Rank 1
Valeriu asked on 21 Feb 2013, 04:44 PM
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

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 22 Feb 2013, 12:30 PM
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.

Tags
GridView
Asked by
Valeriu
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or