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

Null reference exception on unpinning/hiding a pane contained in a parent RadSplitContainer

2 Answers 90 Views
Docking
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 1
Simon asked on 23 Sep 2011, 01:47 AM
Hi,

I get a null reference exception from within the telerik controls when unpinning a pane.

My scenario is that I have an embedded RadDocking control within my user control which has another usercontrol embedded within it.
The second embedded usercontrol is contained within a RadSplitContainer. (If if put it in a RadDocumentHost the browser crashes).

This all works except when I go to unpin or hide it. A null reference exception is thrown.

It seems a bug to me caused by having the second UserControl containing a RadSplitContainer which is the child of a parent control that has a DocumentHost \ RadSplitContainer. Can you test at your end and let me know?

Thanks
Simon

Here's the error
{System.NullReferenceException: Object reference not set to an instance of an object.
   at Telerik.Windows.Controls.RadPane.OnIsPinnedChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at Telerik.Windows.PropertyMetadata.PropertyChangeHook.OnPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
   at System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
   at System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
   at System.Windows.DependencyObject.SetValueInternal(DependencyProperty dp, Object value, Boolean allowReadOnlySet)
   at System.Windows.DependencyObject.SetValue(DependencyProperty dp, Object value)
   at Telerik.Windows.Controls.RadPane.set_IsPinned(Boolean value)
   at Telerik.Windows.Controls.Docking.PaneGroupBase.ExecuteCommand(RadPane pane, ICommand command, PaneGroupBase groupBase)
   at Telerik.Windows.Controls.Docking.PaneGroupBase.<>c__DisplayClass3.<OnPaneCommandInvoke>b__2()}

2 Answers, 1 is accepted

Sort by
0
Miroslav Nedyalkov
Telerik team
answered on 26 Sep 2011, 10:10 AM
Hello Simon,

 The RadDocking control supports only RadSplitContainers as its children and its DocumentHost property also can be set a RadSplitContainer only. The children of the RadSplitContainers can be either RadSplitContainers or RadPaneGroups and the children of RadPaneGroups can be RadPanes. In the Content of the RadPanes you can place whatever you want. The error you are receiving is cased, because you are wrapping a RadSplitContainer inside a UserControl which is not supported.

Hope this helps.

All the best,
Miroslav Nedyalkov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Simon
Top achievements
Rank 1
answered on 26 Sep 2011, 09:36 PM
Thanks for your quick response. I've now sorted.
Cheers
Tags
Docking
Asked by
Simon
Top achievements
Rank 1
Answers by
Miroslav Nedyalkov
Telerik team
Simon
Top achievements
Rank 1
Share this question
or