View Full Version : [CLOSED] TreePanel - SubmittedNode - Get Children SubmittedNodes

Feb 25, 2014, 5:56 PM
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)
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!

Feb 26, 2014, 9:50 AM
Hi @John_Writers,

Please set up the following setting.

<ext:TreePanel ID="TreePanel1" runat="server">
<SelectionSubmitConfig WithChildren="true" />

Feb 27, 2014, 2:42 PM
It works!

Thank you, have a good day.