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

RadDocking PreviewClose Event, how do you get the Pane control which is closing?

2 Answers 112 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Neil
Top achievements
Rank 1
Neil asked on 18 Feb 2010, 08:49 AM
Hi,

I'm using the RadDocking control and added a handler for PreviewClose to be notified when a RadPane closed.  This is firing ok, however I'm not quite sure how to get the RadPane control more importantly the Name of the control which is being destroyed,  I need this to clean up my data storage behind the scenes.

Please can some one provide me with an example or point me in the right direction?

Kind regards
Neil

2 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 18 Feb 2010, 09:49 AM
Hi Neil,

 The panes that are going to be closed are in the Panes collection of the event arguments. Currently only one pane could be closed in the same time so you might use the following:

var pane = e.Panes.First();
The event args provide IEnumerable<RadPane>, because we are planning to provide group closing and we would like to fire the event once for the whole group. This is not implemented yet, but you might prefer to use the code that will take care for this case as well:

foreach (var pane in e.Panes)
{
    // Do what you need to do to the panes here.
}

Hope this helps.

Best wishes,
Miroslav Nedyalkov
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
Neil
Top achievements
Rank 1
answered on 18 Feb 2010, 12:36 PM
Hi,

Thanks for the quick response.   That worked well.   I guess what confused me was that I didn't get a Name property on the RadPane control..   I worked out that I needed to call  RadDocking.GetSerializedTag(  myPaneObject )

Thanks again

Neil 

Tags
Docking
Asked by
Neil
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Neil
Top achievements
Rank 1
Share this question
or