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

Dynamically close RadDocumentPane

6 Answers 201 Views
Docking
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
João Loureiro
Top achievements
Rank 1
João Loureiro asked on 14 Jun 2010, 11:02 AM
Hi.

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

6 Answers, 1 is accepted

Sort by
0
George
Telerik team
answered on 15 Jun 2010, 10:31 AM
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.
0
João Loureiro
Top achievements
Rank 1
answered on 15 Jun 2010, 10:43 AM
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?
0
George
Telerik team
answered on 16 Jun 2010, 03:34 PM
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.
0
João Loureiro
Top achievements
Rank 1
answered on 16 Jun 2010, 03:37 PM
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?
0
Accepted
George
Telerik team
answered on 18 Jun 2010, 12:24 PM
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
0
João Loureiro
Top achievements
Rank 1
answered on 21 Jun 2010, 10:50 AM
Thank you, didn't notice this RadPane function.
Tags
Docking
Asked by
João Loureiro
Top achievements
Rank 1
Answers by
George
Telerik team
João Loureiro
Top achievements
Rank 1
Share this question
or