Dynamically close RadDocumentPane

7 posts, 1 answers
  1. João Loureiro
    João Loureiro avatar
    11 posts
    Member since:
    May 2010

    Posted 14 Jun 2010 Link to this post

    Hi.

    It is possible to dynamically close a rad document pane?
    I'm triyng by RadDockingCommands.Close.Execute(RadDocumentPane, RadDocking) but with no luck.
  2. George
    Admin
    George avatar
    1332 posts

    Posted 15 Jun 2010 Link to this post

    Hi João Loureiro,

    Thank you for contacting Telerik Support.

    You can close/reopen your RadDocumentPanes programmatically using the boolean RadDocumentPane's property IsHidden. When a RadDocumentPane is closed it is actually hidden and you can always make it visible again when needed.

    Please make attention that RadDocumentPane is direct inheritor of RadPane it shares the same code base as its parent - the RadPane class. More information you can find here.

    Attached you can find a sample example how programmatically can close and reopen a RadDocumentPane.

    I hope this information helps. Please set me know if you have any more questions.

    Best wishes,
    George
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. DevCraft banner
  4. João Loureiro
    João Loureiro avatar
    11 posts
    Member since:
    May 2010

    Posted 15 Jun 2010 Link to this post

    But with this approach the RadPane never go to the garbage collector because they have always at least one reference, at the end of some closes the memory will start to became full, how can i clean it, or by your approach it is not possible?
  5. George
    Admin
    George avatar
    1332 posts

    Posted 16 Jun 2010 Link to this post

    Hi João Loureiro,

    Thank you for getting back to me.

    If you want to remove a RadDocumentPane from it's PaneGroup you could call its RemoveFromParent() method, but make sure that this pane has no references. Otherwise It won't go to the garbage collector.

    I hope this information helps. I will be glad to assist to further.

    All the best,
    George
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  6. João Loureiro
    João Loureiro avatar
    11 posts
    Member since:
    May 2010

    Posted 16 Jun 2010 Link to this post

    That was my first approach, i give it as example on my first post "RadDockingCommands.Close.Execute(RadDocumentPane, RadDocking) " but this is giving me a exception, i would like to know what is the correct way to call it. Can you build a sample?
  7. Answer
    George
    Admin
    George avatar
    1332 posts

    Posted 18 Jun 2010 Link to this post

    Hi João Loureiro,

    Thank you for coming back to us.

    Attached you can find a sample project that implements closing (not hiding) a pane from a group. The logic behind clicking the button is to remove the first RadPane from the PaneGroup, if exists. In this way the removed RadPane will go to the Garbage Collector.

    I hope this information helps. I will be glad to assist you further.

    Best wishes,
    George
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  8. João Loureiro
    João Loureiro avatar
    11 posts
    Member since:
    May 2010

    Posted 21 Jun 2010 Link to this post

    Thank you, didn't notice this RadPane function.
Back to Top
DevCraft banner