We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

TreeviewAdv: strange behaviour when checking/unchecking nodes

I have the following code for the user to be able to check/uncheck all child nodes when a node is checked through the NodeClick event:


Private Sub tvRsk_NodeMouseClick(sender As Object, e As TreeViewAdvMouseClickEventArgs) Handles tvRsk.NodeMouseClick 

       SelNodesPropagation(e.Node.Nodes, Not e.Node.Checked) 

 End Sub 

 Private Sub SelNodesPropagation(ByVal nd As TreeNodeAdvCollection, bCheck As Boolean)

        Dim nodX As TreeNodeAdv 

        If (nd Is Nothing) Then Exit Sub 

       For Each nodX In nd 

             nodX.Checked = bCheck 

            SelNodesPropagation(nodX.Nodes, bCheck) 

       Next 

 End Sub 


When a node is clicked, sometimes it works well, sometimes it does not.

Please see what happens in 



Could you please help?

Thx


5 Replies

VR Vijayalakshmi Roopkumar Syncfusion Team September 18, 2019 01:12 PM UTC

 Hi Paulo 

Thank you for contacting Syncfusion Support. 

We have checked the reported issue related with TreeViewAdv, and we would like to let you know that in our TreeViewAdv, we had a performance issue in our older versions. However in our latest version, we have improved the performance  and we have also taken the video for the same as below. However in order to correct the issue that reproduce in NodeMouseClick event, we have change the code as follows: 

C# 
private void TreeViewAdv1_NodeMouseClick(object sender, TreeViewAdvMouseClickEventArgs e) 
{ 
SelNodesPropagation(e.Node.Nodes, e.Node.Checked); 
} 
 

We have also attached the modified sample for your reference. 


 
 
Please try this solution and let us know if it helps you. 

Regards 
Vijayalakshmi V.R. 



PP Paulo P September 22, 2019 05:25 PM UTC

The sample you sent still behave in the same erratic way. Would you please check it once more?

Thank you.



JP Jagadeesan Pichaimuthu Syncfusion Team September 23, 2019 09:59 AM UTC

Hi Paulo, 
 
We can able to reproduce the issue in your version, but we have fixed the reported issues in our latest version. We are glad to announce that our Essential Studio 2019 Volume 3 Beta Release v17.3.0.9 is rolled out with the issue “strange behavior when checking/unchecking nodes in TreeViewAdv” fixed and is available for download under the following link.  
 
  
However in order to correct the issue that reproduce in NodeMouseClick event, we have change the code as follows:  
 
C#  
private void TreeViewAdv1_NodeMouseClick(object sender, TreeViewAdvMouseClickEventArgse)  
 
SelNodesPropagation(e.Node.Nodes, e.Node.Checked);  
 
     
Please get in touch with us if you would require any further assistance.
 
 
Regards, 
Jagadeesan 



PP Paulo P September 23, 2019 01:34 PM UTC

I've found that the only way to make it work properly was by replacing the NodeMouseClick event by the AfterCheck event.

Thx for your help anyway...




JP Jagadeesan Pichaimuthu Syncfusion Team September 24, 2019 05:21 AM UTC

Hi Paulo, 
 
Thanks for the update. 
 
We are glad to know that the reported problem has been resolved at your end. Please let us know if you have any further queries on this. We are happy to help you. 
 
Regards, 
Jagadeesan 


Loader.
Live Chat Icon For mobile
Up arrow icon