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

3 posts, 0 answers
  1. Simon
    Simon avatar
    47 posts
    Member since:
    May 2008

    Posted 22 Sep 2011 Link to this post


    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?


    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. Miroslav Nedyalkov
    Miroslav Nedyalkov avatar
    1718 posts

    Posted 26 Sep 2011 Link to this post

    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 >>

  3. DevCraft R3 2016 release webinar banner
  4. Simon
    Simon avatar
    47 posts
    Member since:
    May 2008

    Posted 26 Sep 2011 Link to this post

    Thanks for your quick response. I've now sorted.
Back to Top