4 Answers, 1 is accepted
Hello Kim,
RadTreeView provides out of the box functionality for programmatically scrolling its content. You can use the ScrollToItem method and scroll to the last item. More information is available in the following article: Scrolling.
According to the provided description, I change the ItemHeight and increase the height of the nodes in order to test your scenario. However, I am able to scroll to the last node. You can check the attached gif file.
public RadForm1()
{
InitializeComponent();
this.radTreeView1.ItemHeight = 30;
}
private void radButton1_Click(object sender, EventArgs e)
{
RadTreeNode lastNode = this.radTreeView1.TreeViewElement.Nodes.Last().Nodes.Last();
this.radTreeView1.TreeViewElement.Scroller.ScrollToItem(lastNode);
}
I hope this information helps. Let me know if there is anything else I can help with.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.
Thank you for the comment.
I did your reply but it wasn't a good way.
I attach an image.
In first image, I made 2000 nodes.(itemheight = 35) but scrollbar don't reached last node.
So, In second image, I revised scrollbar maximum properties.
But it have a problem, too. I couldn't fill the empty space exactly. (below last node)
So, I want to revise maximum value correctly.
Thanks.
Hello,
I found a problem. giving 'itemheight' value in style builder has problem.
So, I give a 'itemheight' value in code and error solved.
Thank you for the comment.
Hello Kim,
According to your last post, it seems that you managed to resolve the issue that you have with setting ItemHeight property in the code. However, if you have any other questions or need further assistance do not hesitate to write back.
Regards,
Nadya
Progress Telerik
Our thoughts here at Progress are with those affected by the outbreak.