radpangroup.ParentOfType returns nothing

4 posts, 0 answers
  1. Gaurav
    Gaurav avatar
    35 posts
    Member since:
    Nov 2012

    Posted 27 Nov 2012 Link to this post

    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.
  2. Mark
    Mark avatar
    12 posts
    Member since:
    Jan 2013

    Posted 13 Mar 2013 Link to this post

    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?


    Thakn you
  3. DevCraft R3 2016 release webinar banner
  4. Konstantina
    Konstantina avatar
    2332 posts

    Posted 18 Mar 2013 Link to this post


    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.

    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  5. Mark
    Mark avatar
    12 posts
    Member since:
    Jan 2013

    Posted 21 Mar 2013 Link to this post

    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
Back to Top