I select two nodes in the tree with the "infragistics.win.ultrawintree.ultratree"
I want to fetch the selected nodes, and I use the below code:
// Here the length is 0, Why??
if(Tree.SelectedNodes.Length >0){
}
Could you give me the code about the "Ultratree.cs"
I have resolved this issue now, thanks.
Custom code to achieve that now.
Hello Jeffrey,
When UltraTree NodeStyle is set to CheckBoxTriState then checking the nodes will not add them to the selected nodes collection. If you want to add these checked nodes to selected nodes collection then custom code has to be written in order to achieve this.
After investigating for NodeStyle enumeration that will add a checked UltraTree node to selected nodes collection and doing some research, this has been determined to be a product idea. You can suggest new product ideas for future versions by emailing ideas@infragistics.com.
Submitting your idea will send it directly to our product management team so that it can be imported into our new ideas community once live: http://ideas.infragistics.com.
Remember when submitting your idea to explain the context in which a feature would be used and why it is needed as well as anything that would prevent you from accomplishing this today. You can even add screenshots to build a stronger case. You can also link back to this thread for additional details.
Thank you in advance to submitting your product idea.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
In our code, this node style is set "Infragistics.Win.UltraWinTree.NodeStyle.CheckBoxTriState;"
And if I choose this checkbox, the tree.selectedNodes is empty.
After you select the nodes in an UltraTree they get added to the selected nodes collection of the Tree. You can access them like this:
Infragistics.Win.UltraWinTree.UltraTree treeTree.SelectedNodes
After looking at your code snippet, I assumed that you want to check the Count of the selected nodes and this can be done using the tree.SelectedNodes.Count property.
Please let me know if you have any questions.