Quantcast
Channel: Telerik Forums RSS
Viewing all articles
Browse latest Browse all 94857

How to re-assign the parent node

$
0
0
Ivan, thanks for sending this sample over.  On first pass it looks like it does what i'm looking for, but when i actually tried to implement this in my solution i found that it doesn't work.  The issue is that content of my RadTreeNode is a UserControl which i mentioned in my original post.  The user control is specified using the <NodeTemplate> tag.  

<NodeTemplate>
      <uc5:wucExpressionID="wucExpression1"runat="server"/>
</NodeTemplate>

This control has a number of RadComboBoxes, RadListBoxes and TextBoxes and buttons etc which are bound to various data sources. In this control the user makes a series of selections which drives the data binding options for each of the following fields found on the control.    When i tried your solution using the .Clone() method, i was able to get the child node into the correct position in the tree but the state of my node, i.e. all the comboboxes and lists box selections/values are wiped out.  The "cloned" node that has been added is completely empty, moreover any child nodes of the cloned node have this same issue. 

I recorded a quick video that demonstrates what we're seeing.

https://www.youtube.com/watch?v=x4X1pmlhQvs

I can see that the RadTreeNode.ParentNode property is just a wrapper for RadTreeNode.Owner, and RadTreeNode.Owner is defined as:

[Browsable(false)]
public IRadTreeNodeContainer Owner
{
    get
    {
        return this._owner;
    }
    internal set
    {
        this._owner = value;
    }
}


It's that blasted internal access modifier that is causing me such a headache.  Why isn't this Property exposed as public? It seems like if that was public it would fix all my problems since i could just re-assign the parent node that already exists, that is in the state that i want it to be in...  Either that, or the Clone() needs to fire some event that i can bind to in my user control that would let me copy the state of the user control so it isn't lost.

I'm at a loss of how to proceed. 

-Mark

Viewing all articles
Browse latest Browse all 94857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>