This is a migrated thread and some comments may be shown as answers.

ScrollBar Maximum Problem

4 Answers 169 Views
ScrollBar
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 03 Jun 2020, 07:47 AM

Hello, I want to find answer about scrollbar.

When item's height in RadTreeView is altered,

scrollbar's Maximum value is untrue.

So, scrolling for find last node is impossible.

Thank you.

4 Answers, 1 is accepted

Sort by
0
Nadya | Tech Support Engineer
Telerik team
answered on 03 Jun 2020, 04:03 PM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
0
Kim
Top achievements
Rank 1
answered on 04 Jun 2020, 12:05 AM

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.

0
Kim
Top achievements
Rank 1
answered on 04 Jun 2020, 04:41 AM

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.

0
Nadya | Tech Support Engineer
Telerik team
answered on 04 Jun 2020, 03:12 PM

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

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tags
ScrollBar
Asked by
Kim
Top achievements
Rank 1
Answers by
Nadya | Tech Support Engineer
Telerik team
Kim
Top achievements
Rank 1
Share this question
or