Unwanted node selection change

Hi, I have attached an image with my problem.

When I click on Node 0 everthing is fine.

But when I click on Node 1 the node selection is changing. I want to keep the selection on Node 1.

Attachment: multicolumntreeview_fe8e16a1.zip

9 Replies

MK Mallika Kannan Syncfusion Team October 25, 2017 09:38 AM UTC

Hi Mate   
   
Thank you for contacting Syncfusion support.   
   
We have checked this reported behavior, unable to reproduce the reported issue. We have also prepared the sample and video for your reference. It can be downloaded from the below link,   
   
   
   
Kindly share the below details,   
   
  1. Syncfusion Essential Studio version used in your end.
  2. What are all the customization and how MultiColumnTreeView has been used in your end.
  3. If possible,  please share your sample
   
Please share the above details that will helpful for further analysis and provide the solution as earlier as possible.   
   
Regards,   
Mallika   
 



VH Vhalaky October 25, 2017 03:09 PM UTC

Hi, I have attached your modified sample (some property and few line of code).

Steps to reproduce the problem:

1. click on Node0

2. scroll to Node15

3. click on Node15

Please let me know if you need further explanation.


Attachment: MultiColumnTreeView_Issue1145115350_cca5a399.zip


KR Kannan R Syncfusion Team October 26, 2017 10:03 AM UTC

Hi Mate   
   
Thank you for your update.    
   
We have checked your sample and this reported problem occurs due to using NodeMouseClick event to expand the Selected Node.    
   
Details   
   
When TreeNodeAdv is expanded, it will be navigated to top most position and NodeMouseClick event will be raised before Node is selected, expanded node is displayed in Top and Node in mouse pointer position is gets selected and so it appears as selection problem. This reported requirement needs to be achieved by handling MouseUp event.  Kindly refer below codes.  
 
Code Snippet: [C#] 
 
 
        private void MultiColumnTreeView1_MouseUp(object sender, MouseEventArgs e) 
        { 
            if (this.multiColumnTreeView1.GetNodeAtPoint(e.Location) != null) 
            { 
                Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv node = multiColumnTreeView1.GetNodeAtPoint(e.Location); 
                if (!node.Expanded) 
                    node.Expand(); 
                else 
                    node.CollapseAll(); 
            } 
        } 
 
 
We have also modified the sample based on this.  
 
 
Kindly check with above solution and let us know if it helps.  
 
Regards 
Kannan 



VH Vhalaky October 26, 2017 03:43 PM UTC

Thank you, it solved the problem!



KR Kannan R Syncfusion Team October 27, 2017 03:49 AM UTC

Hi Mate  
 
We are glad that we helped you on this. Please let us know if you need any further assistance. 
 
Regards 
Kannan 



VH Vhalaky replied to Kannan R October 31, 2017 03:17 PM UTC

Hi Mate   
   
Thank you for your update.    
   
We have checked your sample and this reported problem occurs due to using NodeMouseClick event to expand the Selected Node.    
   
Details   
   
When TreeNodeAdv is expanded, it will be navigated to top most position and NodeMouseClick event will be raised before Node is selected, expanded node is displayed in Top and Node in mouse pointer position is gets selected and so it appears as selection problem. This reported requirement needs to be achieved by handling MouseUp event.  Kindly refer below codes.  
 
Code Snippet: [C#] 
 
 
        private void MultiColumnTreeView1_MouseUp(object sender, MouseEventArgs e) 
        { 
            if (this.multiColumnTreeView1.GetNodeAtPoint(e.Location) != null) 
            { 
                Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv node = multiColumnTreeView1.GetNodeAtPoint(e.Location); 
                if (!node.Expanded) 
                    node.Expand(); 
                else 
                    node.CollapseAll(); 
            } 
        } 
 
 
We have also modified the sample based on this.  
 
 
Kindly check with above solution and let us know if it helps.  
 
Regards 
Kannan 


 Hi again. I think I found a bug or something.

Steps to reproduce (based on your October 26, 2017 06:03 AM sample):

1. click on Node0

2. click on Node15

3. click on Node0 to close. Nothing happen.


Attachment: mctv_ae5297a2.zip


MK Mallika Kannan Syncfusion Team November 1, 2017 08:39 AM UTC

Hi Mate   
  
Thanks for your update.   
  
We have improved the suggested solution by using expanded property in MultiColumnTreeView TreeNodeAdv. Please make use of below code example for your reference.    
  
Code Example [C#]   
  
if (this.multiColumnTreeView1.GetNodeAtPoint(e.Location) != null)   
{   
                Syncfusion.Windows.Forms.Tools.MultiColumnTreeView.TreeNodeAdv node = multiColumnTreeView1.GetNodeAtPoint(e.Location);   
                if (!node.Expanded)   
                    node.Expanded = true;   
                else   
                    node.Expanded = false;   
}   
 
   
We have also prepared the sample and video for your reference. It can be downloaded from the below link,   
   
  
   
Kindly check the above solution and let us know if it is helpful.   
  
Regards,   
Mallika   



VH Vhalaky November 1, 2017 09:48 AM UTC

Perfect, thank you!



MK Mallika Kannan Syncfusion Team November 2, 2017 04:08 AM UTC

Hi Mate, 
 
Thanks for your update.  
 
We are glad to hear that we have helped you in this.  
 
Please let us know if you need any other assistance.  
 
Regards, 
Mallika 


Loader.
Up arrow icon