ScrollBar Maximum Problem

5 posts, 0 answers
  1. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2019

    Posted 03 Jun Link to this post

    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.

  2. Nadya
    Admin
    Nadya avatar
    379 posts

    Posted 03 Jun Link to this post

    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.
  3. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2019

    Posted 03 Jun in reply to Nadya Link to this post

    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.

  4. Kim
    Kim avatar
    10 posts
    Member since:
    Oct 2019

    Posted 03 Jun in reply to Nadya Link to this post

    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.

  5. Nadya
    Admin
    Nadya avatar
    379 posts

    Posted 04 Jun Link to this post

    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.
Back to Top