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

Circular reference error

2 Answers 270 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Jeremy Murtishaw
Top achievements
Rank 1
Jeremy Murtishaw asked on 10 Aug 2009, 04:11 AM

Telerik,

When I pin a RadDock to autohide it, and then mouseover on that hidden dock's tab, I get an ArgumentException saying that "A circular control reference has been made. A control cannot be owned by or parented to itself."  From what I've researched online, it seems like this is something that can happen if there is a naming issue where two controls or a dock and its panel have the same name.  I painstakingly verified that this is not the case in my code, and even started from scratch on a new form to keep it simple but still had the problem.  I eventually gave up and went with the DockingManager, which for some reason works fine.  I'm having some issues with performance with the DockingManager however, and since I've heard about other features contained in the RadDock that I'd like to have, I'd really like to successfully implement the RadDock.  Thinking that the "Convert to RadDock" feature would take care of whatever issue I had before, I used that on my working DockingManager, but to no avail.  Everything seems to work great until I hide a RadDock and mouse over the tab (note, I don't need to have my mouse directly over the tab... hovering over any part of the panel that contains the tab causes the same error).  Can you please assist me in solving this?  My app is C# using WinForms Q2 2009.  Let me know if you need more technical data.

Thanks,
Jeremy

2 Answers, 1 is accepted

Sort by
0
Jeremy Murtishaw
Top achievements
Rank 1
answered on 12 Aug 2009, 04:22 AM
I looked into this further, and discovered that the problem has something to do with my form containing the RadDock being set as an mdi child of another form.  Here's the code that opens up the RadForm that contains the RadDock:

 

private void cmdOpenTest_Click(object sender, EventArgs e)  
{  
    mdiTest frm = new mdiTest();  
    frm.MdiParent = this;  
    frm.Show();  
}  
 
 
 
 

 


If I comment out the frm.MdiParent = this line, then the RadDock works correctly.  I need the parent/child mdi relationship however, so this is not an acceptable workaround.  Any ideas why this causes the RadDock issue described in my previous post?

Thanks,
Jeremy

 

 

 

0
Jordan
Telerik team
answered on 12 Aug 2009, 08:53 AM
Hi Jeremy Murtishaw,

Thank you for the additional details, they really helped. I saw that you have downloaded Q2 2009 version and tried with it, and I was able to reproduce the issue. Then I tried with the latest official version (Q2 2009 SP1) and it seems that the problem is fixed. So I would suggest that you upgrade to Q2 2009 SP1.

Best wishes,
Jordan
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Dock
Asked by
Jeremy Murtishaw
Top achievements
Rank 1
Answers by
Jeremy Murtishaw
Top achievements
Rank 1
Jordan
Telerik team
Share this question
or