[CLOSED] TreePanel - SubmittedNode - Get Children SubmittedNodes

  1. #1

    [CLOSED] TreePanel - SubmittedNode - Get Children SubmittedNodes

    Hi,
    I'm working with a treepanel.

    I need to get (Server side) a list containing all the tree nodes which are children of the selected node. (the tree is in single select mode).

    So, I did that with a recursive function, but the field Children of a SubmittedNode is always empty, so this recursion doesn't work.

    private List<int> GetComponentiFigli()        {
                List<int> res = new List<int>();
                List<SubmittedNode> lstSubmitted = new List<SubmittedNode>();
    
    
                lstSubmitted = GetChildSubmittedNode(TreeFunctional.SelectedNodes[0], lstSubmitted);
    
    
                foreach (SubmittedNode s in lstSubmitted)
                    res.Add(Convert.ToInt32(s.Attributes["ID_INV_REGISTRY"]));
                return res;
            }
    
    
            private List<SubmittedNode> GetChildSubmittedNode(SubmittedNode node, List<SubmittedNode> list)
            { 
                foreach (SubmittedNode i in node.Children)
                    list.AddRange(GetChildSubmittedNode(i,  list));
                return list;
            }
    Thanks for your time.

    Have a good day!
    Last edited by Daniil; Feb 27, 2014 at 1:46 PM. Reason: [CLOSED]
  2. #2
    Hi @John_Writers,

    Please set up the following setting.
    <ext:TreePanel ID="TreePanel1" runat="server">
        <SelectionSubmitConfig WithChildren="true" />
    </ext:TreePanel>
  3. #3
    Great!
    It works!

    Thank you, have a good day.

Similar Threads

  1. [CLOSED] Collapse all Accordion children
    By RCN in forum 2.x Legacy Premium Help
    Replies: 10
    Last Post: Jun 24, 2014, 1:09 PM
  2. [OPEN] [#207] How to add a node with children
    By jchau in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Apr 15, 2013, 3:20 PM
  3. [CLOSED] Get Children Nodes of TreePanel
    By softmachine2011 in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Oct 04, 2012, 10:00 AM
  4. communication between children
    By threewonders in forum 1.x Help
    Replies: 5
    Last Post: Apr 11, 2012, 11:52 AM
  5. Replies: 2
    Last Post: Nov 22, 2010, 3:41 AM

Posting Permissions