Jul 02, 2013, 6:37 PM
Obtain NodeID from parent node (nodeProxy)
I am having an issue obtaining the nodeID from the parent node.
First of all, the node that I am trying to access gets passed to me by direct event:
I am using a PanelTree as a break down of data, so in order to obtain the data for a particular piece of data, I need to first consult the parent (which category is the data under)
Now here is the tricky part.
In this case, I am now juggling three different Node types : Node, SubmittedNode, ProxyNode. The last two are not castable to Node.
In order to obtain the parent NodeID I am currently stuck trying to obtain it this way:
Is there a way to obtain the basic Node type from a ProxyNode? If not, is there a way for me to extract the NodeID? Is it named something different?
First of all, the node that I am trying to access gets passed to me by direct event:
protected void UserTypeClicked(object sender, DirectEventArgs args)
{
SubmittedNode node = ((TreePanel)sender).SelectedNodes[0];
BugHelper.Assert(node.NodeID != null || node.NodeID != "", "Missing Node ID");
BugHelper.Assert(node.Text != null || node.Text != "", "Missing Node text");
PANEL_TYPES panelType = ShowAppropriatePanel(node);
fillPanel(panelType, node);
}
As a result, I can extract the NodeID from the original node.I am using a PanelTree as a break down of data, so in order to obtain the data for a particular piece of data, I need to first consult the parent (which category is the data under)
Now here is the tricky part.
In this case, I am now juggling three different Node types : Node, SubmittedNode, ProxyNode. The last two are not castable to Node.
In order to obtain the parent NodeID I am currently stuck trying to obtain it this way:
((TreePanel)node.Tree).GetNodeById(node.NodeID).ParentNode().[???]
which is now a ProxyNode. The issue is the ProxyNode does not have a function or property that lets me know the NodeIDIs there a way to obtain the basic Node type from a ProxyNode? If not, is there a way for me to extract the NodeID? Is it named something different?