I have Two ultra Trees on a window form. Both tress shows some Info. Now I want when I scroll one tree another tree should also scroll.
Please suggest me
Thanks in Advance.
Hello Robin,
Maybe one possible approach could be to handle Scroll() events of both controls and include the code below:
private void ultraTree1_Scroll(object sender, Infragistics.Win.UltraWinTree.TreeScrollEventArgs e) { ultraTree2.TopNode = ultraTree1.TopNode; } private void ultraTree2_Scroll(object sender, TreeScrollEventArgs e) { ultraTree1.TopNode = ultraTree2.TopNode; }
private void ultraTree1_Scroll(object sender, Infragistics.Win.UltraWinTree.TreeScrollEventArgs e)
{
ultraTree2.TopNode = ultraTree1.TopNode;
}
private void ultraTree2_Scroll(object sender, TreeScrollEventArgs e)
ultraTree1.TopNode = ultraTree2.TopNode;
Please take a look at the attached sample for more details. Other approach could be if you are using ultraTree1.PerformAction(UltraTreeAction.ScrollDown, false, false);
Regards
Have you been able to resolve your issue ? Did you have a time to take a look at the attached sample. Let me know if you have any questions
Hi Georgi
I tried it before. I tried it again but ther are two issues.
1. I have set anchor properties up,left,bottom of one tree and up,right,down of other which dissabling this code to scroll parallaly. If I remove acnchor - down property of both trees than code starts scrolling parallaly but I want to set anchor-down property.
2. I have variable data in both trees. One tree have more nodes than other. if one tree does not have more nodes than other tree than other tree stop scrolls.
robinkukreja85 said:1. I have set anchor properties up,left,bottom of one tree and up,right,down of other which dissabling this code to scroll parallaly
I try to reproduce your scenario with my sample, but everything works properly. Could you please tell me what is your current version and do you have installed any service release and which one. I made my test with version 11.2.20112.2019. If you are using older service release, you could download the latest available from infragistics.com -> MyIG -> My Keys and Downloads.
robinkukreja85 said: 2. I have variable data in both trees. One tree have more nodes than other. if one tree does not have more nodes than other tree than other tree stop scrolls.
As far as I know this is expected behavior, because the shorter UltraTree already reach the last node.
Please let me know if you have any questions
I am using 10.1 version and problem is not of versioning, some where anchor property is creating problem. May be reason is when I set Anchor Properties, scroll bar of one of tree does not appear. Now temporarily I set anchor property of both tress top,Bottom and its working.
Could you please tell me what is your current build of version 10.1. We had such kind of issue (with Anchor property ) a long time ago, which was fixed. Please take a look at the attached video file with the mentioned settings. Maybe another approach could be if you are using property Dock = letf and Dock = right. Let me know if you have any questions