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

radpangroup.ParentOfType returns nothing

3 Answers 64 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Gaurav
Top achievements
Rank 1
Gaurav asked on 27 Nov 2012, 12:52 PM
I am facing a weird problem with your docking control. I am adding a rad pane dynamically to a radpane group . It was working fine until i started  using save and loadlayout function.
When i save dock state with dynamically added pane it get saved correctly
then i reload it by loadlayout it loaded correctly and problem starts from now \
I want to test new rad pane which now adding is already exist in saved layout for this i have to use following functions


  radpangrp.ParentOfType(Of RadDocking).Panes.Where(Function(fun) RadDocking.GetSerializationTag(fun) = "UserPane").Count

radpangrp this a radpangroup and its ParentOfType getting nothing. 
Why it is so ??
Thanks in advance.

3 Answers, 1 is accepted

Sort by
0
Mark
Top achievements
Rank 1
answered on 13 Mar 2013, 05:59 PM
I am having a similar problem. I am having trouble reproducing it in a simple example, so any insights would be great.

i have a UserControl in a RadPane (in a RadGroup...)

I have the following code in my UserControl
  RadPane panelA = this.ParentOfType<RadPane>();
  RadPane panelB = this.Parent as RadPane;

WHen I run it, sometimes both panelA and PanelB are a valid RadPanes. Later panelA is null and PanelB is still a valid RadPane.

Could you help me identify under what conditions this.Parent as RadPane returns something, but this.ParentOfType<RadPane>() would return null?

Help?

Thakn you
Mark
0
Konstantina
Telerik team
answered on 18 Mar 2013, 12:43 PM
Hi,

Could you please share with us in which scenarios the ParentOfType is not able to find the RadPane. If it is floating the RadPane no longer exists, it is a ToolWindow. This is the only scenario I can think of, that might be causing the issue. Also, the Docking control has a collection of panes - the Panes property, which you might use.
Please give us some more details about the problem, and if possible a sample project. That will help us in resolving the issue in a timely manner.

Regards,
Konstantina
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Mark
Top achievements
Rank 1
answered on 21 Mar 2013, 07:54 PM
Thank you for your thoughts. .... Hmmm.... As I mentioned, "I am having trouble reproducing it in a simple example"

I dont' think it has to do with floating panes. Althought perhaps tabs.

I find it very odd that this.Parent as RadPane returns something, and at the same time this.ParentOfType<RadPane>() would return null?

Anyway, I will leave this issue dormant until more information surfaces.

Thank you for you time
Mark
Tags
Docking
Asked by
Gaurav
Top achievements
Rank 1
Answers by
Mark
Top achievements
Rank 1
Konstantina
Telerik team
Share this question
or