If I add a node with children to a tree after setting the tree's Override.NodeStyle to SynchronizedCheckBox, and I click on the check box of the parent before expanding the children, then the parent's checkbox remains unchecked (the children's check boxes are checked, however).
This only appears to occur on the first time clicking the parent's checkbox, and only if the node has not already been expanded.
Imports Infragistics.Win.UltraWinTree Public Class Form1 Inherits System.Windows.Forms.Form Public Sub New() Dim UltraTree1 As UltraTree = New UltraTree() UltraTree1.Dock = System.Windows.Forms.DockStyle.Fill UltraTree1.Override.NodeStyle = NodeStyle.SynchronizedCheckBox Dim parentNode As New UltraTreeNode("Node 0") parentNode.Nodes.AddRange({New UltraTreeNode("Node 1"), New UltraTreeNode("Node 2")}) UltraTree1.Nodes.Add(parentNode) Me.Controls.Add(UltraTree1) End Sub End Class
Hi Jon,
Thank you for posting in our forum.
I was able to reproduce this issue using your sample code, so I opened a new private case for you -CAS-151152-R2F6H2 – and I logged this behavior in our internal issue tracking system with ID 188647. You can view your currently active cases if you follow this link:
https://es.infragistics.com/my-account/support-activity
Thank you for your response.
I was able to find a workaround by expanding and unexpanding the parent node after adding it, however I look forward to not having to use this hack ^_^
I just wanted to let you know I found a better workaround. The issue occurs because you are setting the NodeStyle on the tree and then adding the nodes after that. This essentially changes the NodeStyle for all of the nodes when the root node is added to the tree and the tree wasn't handling that case correctly. This will be fixed in the April service release. But in the mean time, another potential workaround would be for you to add your nodes to the tree directly.
So, for example, instead of creating a node and adding it to the tree, use the tree.Nodes.Add method, and then add the child nodes to that root node which already belongs to the tree.