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

TreeNodeAdv.BringIntoView

This method is not working for me in all situations. Here is an example where it fails (+ = closed, - = open): Tree View: +Folder1 State of nodes: +Folder1 -Folder2 (not visible) -Folder3 (not visible) node (not visible) In the above understand the Folder1 is closed so you would not see the child folders and child node unless you expand Folder1. Just note that the child folders under Folder1 are in expanded state. Now I call node.BringIntoView and Folder1 gets highlighted but does not expand. This only occurs when the child folders are expanded, if they are not expanded BringIntoView works as expected.

4 Replies

DT Deepa TS Syncfusion Team March 20, 2006 02:21 PM UTC

Hi Rich, I am afraid,I was not able to reproduce the issue. The BringIntoView expands parent nodes to make the particular node visible and also scrolls the tree such that this node is brought into view. //Here the BringIntoView() is called for parent node. private void button1_Click(object sender, System.EventArgs e) { TreeNodeAdv node=this.treeViewAdv1.Nodes[2]; node.BringIntoView(); node.TextColor=Color.Red; } //Here the BringIntoView() is called for child node private void button2_Click(object sender, System.EventArgs e) { TreeNodeAdv node=this.treeViewAdv1.Nodes[2].Nodes[0].Nodes[1]; node.BringIntoView(); node.TextColor=Color.Blue; } I have attached a sample,which explains that ,if the BringIntoView() method is called for the ParentNode ,the ParentNode will not get expanded,but the node is brought into view.Whereas,if the BringIntoView() method is called for the ChildNode,the ParentNode get expanded as well as the childnode is brought into view. Please take a look at the attached sample and let me know if I had understood your problem correctly. Thanks for your interest in Syncfusion products. Kind Regards, Deepa

BringIntoView.zip


GR Gordan Redzic March 20, 2006 09:33 PM UTC

Hi Deepa, I have included an example to re-create the issue I am seeing. Please do the following when running to see the issue: 1) Collapse all nodes, click the button, nodeB will be in view (works) 2) Collapse Node1, click the button, nodeB is not in view (fails) 3) Collapse Root node, click the button, nodeB will not be in view (fails) 4) Open Root and Node1, collapse Node2, click the button, nodeB will be in view (works) In all cases above the code calls BringIntoView on nodeB. But as you will see it does not work if nodeB''s parent is expanded and nodeB''s parent''s parent is expanded. >Hi Rich, > >I am afraid,I was not able to reproduce the issue. > >The BringIntoView expands parent nodes to make the particular node visible and also scrolls the tree such that this node is brought into view. > >//Here the BringIntoView() is called for parent node. > >private void button1_Click(object sender, System.EventArgs e) >{ >TreeNodeAdv node=this.treeViewAdv1.Nodes[2]; node.BringIntoView(); >node.TextColor=Color.Red; >} > >//Here the BringIntoView() is called for child node > >private void button2_Click(object sender, System.EventArgs e) >{ >TreeNodeAdv node=this.treeViewAdv1.Nodes[2].Nodes[0].Nodes[1]; >node.BringIntoView(); >node.TextColor=Color.Blue; >} > >I have attached a sample,which explains that ,if the BringIntoView() method is called for the ParentNode ,the ParentNode will not get expanded,but the node is brought into view.Whereas,if the BringIntoView() method is called for the ChildNode,the ParentNode get expanded as well as the childnode is brought into view. > >Please take a look at the attached sample and let me know if I had understood your problem correctly. > >Thanks for your interest in Syncfusion products. > >Kind Regards, > >Deepa

BringIntoView.zip

TestBringIntoView.zip


DT Deepa TS Syncfusion Team March 22, 2006 10:43 AM UTC

Hi Rich, Sorry for the delay in getting back to you. I was able to reproduce the issue in BringIntoView method. We have fixed this problem internally and it will available in our next patch version.I will get back to you with more information regarding the patch release, as soon as possible. Thank you for your interest in Syncfusion products. Regards, Deepa .


DT Deepa TS Syncfusion Team June 6, 2006 11:44 AM UTC

Hi Rich, The fix for the BringIntoView method issue has been included in our Final release of v.4.2 (v.4.2.0.37). And you can download the same from the following link: 4.2VFinalRelease Let me know if you need any further assistance. Thanks for your interest in Essential Tools. Regards, Deepa

Loader.
Live Chat Icon For mobile
Up arrow icon