Scroll selected node into viewport?

2 posts, 0 answers
  1. Jon
    Jon avatar
    14 posts
    Member since:
    Sep 2009

    Posted 30 May 2014 Link to this post

    I'm selecting a node on a TreeView programmatically. How would I expand all parent nodes and scroll the node into the viewport? Thanks!
  2. Alex Gyoshev
    Alex Gyoshev avatar
    2513 posts

    Posted 03 Jun 2014 Link to this post

    Hello Jonathan,

    You can use the expandPath TreeView method to expand a list of nodes. Here is a demo:

    For older Kendo UI TreeView versions, which do not have an expandPath method, one can use some custom code:

    In order to scroll a node in the viewport, you can use either the scrollIntoView method, or if you want to have more control over the transition, the scrollTo jQuery plug-in.

    Alex Gyoshev
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top