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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

TreeviewAdv: strange behaviour when checking/unchecking nodes

Thread ID:

Created:

Updated:

Platform:

Replies:

147620 Sep 17,2019 02:44 PM UTC Sep 24,2019 05:21 AM UTC WinForms 5
loading
Tags: TreeViewAdv
Paulo P
Asked On September 17, 2019 02:44 PM UTC

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


Vijayalakshmi Roopkumar [Syncfusion]
Replied On 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. 


Paulo P
Replied On 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.


Jagadeesan Pichaimuthu [Syncfusion]
Replied On 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 


Paulo P
Replied On 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...



Jagadeesan Pichaimuthu [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon